Categories
Development Ruby

Ruby 2.4 and BigDecimal error (invalid value)

Given a value in a hash like this:

billed_amt:""

This code then:

BigDecimal.new(tt[:billed_amt].to_s)

results in this error:

ArgumentError: invalid value for BigDecimal(): ""

Is this correct behaviour? I have tried updating the gem with no luck.

Leave a Reply

Your email address will not be published. Required fields are marked *