-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
With mongoid (> 2.2.0), this spec fails. With mongoid (<= 2.2.0), the spec passes.
The problematic line is lib/mongoid/fields/serializable/integer.rb#L24:
("%g" % object.to_s) =~ /\./ ? Float(object) : Integer(object)
With ruby-1.9.2-p180, we have
("%g" % (1024**2).to_s)
=> "1.04858e+06"