mongodb/mongo-ruby-driver — pull request #337 by estolfo (2013-12-17 20:21:07+00:00)
Title: De/serialization support for BSON:Regex in java extension

These changes in the java extension will allow de/serialization of BSON:Regex objects when using JRuby.

Two things are incomplete about this:

1) I need to figure out how to make these changes without changing the API of the deserialization java function (https://github.com/estolfo/mongo-ruby-driver/blob/RUBY-698-bsonregexp/lib/bson/bson_java.rb#L33) I think I need to overload the constructor.

2) I would prefer to use the constants of the BSON:Regex class here instead of literal flags.
https://github.com/estolfo/mongo-ruby-driver/blob/RUBY-698-bsonregexp/ext/jbson/src/main/jbson/RubyBSONEncoder.java#L650-L665