Module: Moped::BSON::Extensions::Regexp::ClassMethods
- Included in:
- Regexp
- Defined in:
- lib/moped/bson/extensions/regexp.rb
Instance Method Summary collapse
Instance Method Details
#__bson_load__(io) ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/moped/bson/extensions/regexp.rb', line 19 def __bson_load__(io) source = io.gets(NULL_BYTE).from_utf8_binary.chop! = 0 while (option = io.readbyte) != 0 case option when 105 # 'i' |= ::Regexp::IGNORECASE when 109, 115 # 'm', 's' |= ::Regexp::MULTILINE when 120 # 'x' |= ::Regexp::EXTENDED end end new(source, ) end |