diff --git a/Rakefile b/Rakefile index 16b659a..3803487 100644 --- a/Rakefile +++ b/Rakefile @@ -7,7 +7,7 @@ require 'rake/gempackagetask' require 'rake/contrib/rubyforgepublisher' GEM = "mongo" -GEM_VERSION = '0.1.1' +GEM_VERSION = '0.1.2' SUMMARY = 'Simple pure-Ruby driver for the 10gen Mongo DB' DESCRIPTION = 'This is a simple pure-Ruby driver for the 10gen Mongo DB. For more information about Mongo, see http://www.mongodb.org.' AUTHOR = 'Jim Menard' diff --git a/lib/mongo/util/bson.rb b/lib/mongo/util/bson.rb index 69cfd73..76033a8 100644 --- a/lib/mongo/util/bson.rb +++ b/lib/mongo/util/bson.rb @@ -252,7 +252,7 @@ class BSON end def deserialize_dbref_data(buf, key, parent) - ns = deserialize_cstr(buf) + ns = deserialize_string_data(buf) oid = deserialize_oid_data(buf) XGen::Mongo::Driver::DBRef.new(parent, key, @db, ns, oid) end @@ -275,9 +275,7 @@ class BSON end def serialize_dbref_element(buf, key, val) - buf.put(REF) - self.class.serialize_cstr(buf, key) - self.class.serialize_cstr(buf, val.namespace) + serialize_string_element(buf, key, val.namespace, REF) buf.put_array(val.object_id.to_a) end