Dealing with big decimal number

warning: is deprecated; use BigDecimal() method instead.

i am getting above warning message how can i solve this

BigDecimal seems to use a factory method rather than the usual .new approach. The fact that it is showing as deprecated implies that it previously supported .new but doesn’t any more.

require 'bigdecimal'

bd = BigDecimal('10.0')

puts bd
# 0.1e2

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs