Turn an UNDEFINED type in BSON into a nil in Ruby.

This commit is contained in:
Jim Menard 2009-01-09 15:02:08 -05:00
parent 53fcc027f6
commit 991a75bda7
1 changed files with 2 additions and 2 deletions

View File

@ -133,13 +133,13 @@ class BSON
when DATE
key = deserialize_cstr(@buf)
doc[key] = deserialize_date_data(@buf)
when NULL
when NULL, UNDEFINED
key = deserialize_cstr(@buf)
doc[key] = nil
when REF
key = deserialize_cstr(@buf)
doc[key] = deserialize_dbref_data(@buf)
when BINARY, UNDEFINED, SYMBOL, CODE_W_SCOPE
when BINARY, SYMBOL, CODE_W_SCOPE
# TODO
raise "unimplemented type #{type}"
when EOO