-
Type:
Bug
-
Resolution: Done
-
Priority:
Blocker - P1
-
Affects Version/s: 1.1.0
-
Component/s: None
-
None
-
Environment:Win7 x64, Ruby 1.9.1p430, Ruby 1.9.2p0, DevKit 4.5 (all from Rubyinstaller.org)
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Inserting data using MRI 1.9.2p0 is incorrect. It doesn't fail, but viewing the data with the mongo console shows that all values are "null". Even weirder, I can mongodump the collection and bsondump to json format and the data is CORRECT even though the mongo console told me it was all null!
Comparing the output of bsondump in debug mode shows that something is very wrong.
The following gist shows that this works okay with MRI 1.9.1p430 and fails with 1.9.2p0.
I confirmed this is related to the C extension. Removing the C extension and doing a pure ruby insert from 1.9.2p0 works as expected.
(When viewing through mongo console, the pure ruby insert shows the number directly. Using MRI 1.9.1p430 and the C extension lists all integers as NumberLong( x ), so the C extension that does work has slightly different behavior than the C extension on linux/osx.)
I was only able to reproduce this on Windows; I could not reproduce on UNIX.