-
Type: Improvement
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
With BSON::Decimal128 used for storage of BigDecimals in Mongoid, there is a test failure due to .sort attempting to compare Decimal128 instances:
1) Mongoid::Contextual::Mongo#distinct when providing a demongoizable field when legacy_pluck_distinct is set returns the non-demongoized distinct field values Failure/Error: expect(context.distinct(:sales).sort).to eq([ "1E2", "2E3" ]) ArgumentError: comparison of BSON::Decimal128 with BSON::Decimal128 failed # ./spec/mongoid/contextual/mongo_spec.rb:563:in `sort' # ./spec/mongoid/contextual/mongo_spec.rb:563:in `block (5 levels) in <top (required)>' # ./spec/support/macros.rb:26:in `block in config_override'
BSON::Decimal128 should implement comparison operators against other Decimal128 instances, Integers, Floats and BigDecimals.
- is related to
-
RUBY-2952 BSON::Decimal128 always compares false with other types
- Closed
- links to