Skip to content

WIP - RUBY-3671 - Hash should honor BSON::Registry - #352

Open
johnnyshields wants to merge 2 commits into
mongodb:masterfrom
johnnyshields:RUBY-3671-hash-should-honor-bson-registry
Open

WIP - RUBY-3671 - Hash should honor BSON::Registry#352
johnnyshields wants to merge 2 commits into
mongodb:masterfrom
johnnyshields:RUBY-3671-hash-should-honor-bson-registry

Conversation

@johnnyshields

@johnnyshieldsjohnnyshields commented May 7, 2025

Copy link
Copy Markdown
Contributor

Fixes RUBY-3671

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

ifallow_decimal128BSON::Registry.register(BSON::Decimal128::BSON_TYPE,BSON::Decimal128)elseBSON::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 ownerMay 7, 2025 15:22
@codeowners-service-app

Copy link
Copy Markdown

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

Sign up for freeto 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

@johnnyshields