Skip to content

Conversation

johnnyshields
Copy link
Contributor

@johnnyshields johnnyshields commented May 7, 2025

Fixes RUBY-3671

There is a BSON::Registry which determines how BSON is deserialized. For example, Mongoid has this code:

if allow_decimal128
  BSON::Registry.register(BSON::Decimal128::BSON_TYPE, BSON::Decimal128)
else
  BSON::Registry.register(BSON::Decimal128::BSON_TYPE, BigDecimal)
end 

However, BSON gem does not honor this registry for Hash, it always deserializes as BSON::Document, even when the registry is set to Hash.

@johnnyshields johnnyshields requested a review from a team as a code owner May 7, 2025 15:22
@codeowners-service-app codeowners-service-app bot requested a review from alexbevi May 30, 2025 02:44
Copy link

Assigned alexbevi for team dbx-ruby because comandeo-mongo is out of office.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant