-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Trivial - P5
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Ruby Drivers
-
None
-
None
-
None
-
None
-
None
-
None
In bson-ruby, the module BSON::Registry does the following:
MAPPINGS = {} ... def register(byte, type) MAPPINGS[byte.ord] = type define_type_reader(type) end
Mutating a constant like this is a no-no. Instead MAPPINGS should be a module variable @mappings.