As per the documentation of BigDecimal, for all Ruby versions 2.6.x, you should be using BigDecimal with a specific version:
The differences among versions are given below:
version characteristics Supported ruby version range 2.0.0 You cannot use BigDecimal.new and do subclassing 2.4 .. 1.4.x BigDecimal.new and subclassing always prints warning. 2.3 .. 2.6 1.3.5 You can use BigDecimal.new and subclassing without warning .. 2.5
You can select the version you want to use using
gem
method in Gemfile or scripts. For example, you want to stick bigdecimal version 1.3.5, it works file to put the followinggem
call in you Gemfile.gem 'bigdecimal', '1.3.5'