Actions
Bug #10569
closedBigDecimal#fix returns a BigDecimal object instead of a Integer
Description
According docs (http://www.ruby-doc.org/stdlib-2.1.5/libdoc/bigdecimal/rdoc/BigDecimal.html#method-i-fix): fix method return the integer part of the number. But it's returning a BugDecimal:
a = BigDecimal(7)
=> #BigDecimal:7fb18015e698,'0.7E1',9(27)
a.fix
=> #BigDecimal:7fb180185d38,'0.7E1',9(18)
a.fix.to_i
=> 7
Similar problem happens with frac method.
Actions
Like0
Like0Like0Like0Like0