-
Type: Improvement
-
Resolution: Done
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: BSON
-
None
In Ruby, regular expression options are represented as an integer bit mask:
irb(main):007:0> (/foo/i).options => 1
In extended json, options are represented as a sorted alphabetic string.
BSON::Regexp::Raw claims to accept options as both integers and strings but I am not seeing any code to convert from one representation to another.
The class should store the options in one of the two formats and convert the other one to the canonical form.