Added TODO comments and separate code path for unimplemented types in deserialize
This commit is contained in:
parent
3b921e0b80
commit
efd31a8bc5
@ -82,6 +82,7 @@ class BSON
|
|||||||
when NULL
|
when NULL
|
||||||
serialize_null_element(@buf, k)
|
serialize_null_element(@buf, k)
|
||||||
when BINARY, UNDEFINED, REF, SYMBOL, CODE_W_SCOPE
|
when BINARY, UNDEFINED, REF, SYMBOL, CODE_W_SCOPE
|
||||||
|
# TODO
|
||||||
raise "unimplemented type #{type}"
|
raise "unimplemented type #{type}"
|
||||||
else
|
else
|
||||||
raise "unhandled type #{type}"
|
raise "unhandled type #{type}"
|
||||||
@ -132,6 +133,9 @@ class BSON
|
|||||||
when NULL
|
when NULL
|
||||||
key = deserialize_element_name(@buf)
|
key = deserialize_element_name(@buf)
|
||||||
doc[key] = nil
|
doc[key] = nil
|
||||||
|
when BINARY, UNDEFINED, REF, SYMBOL, CODE_W_SCOPE
|
||||||
|
# TODO
|
||||||
|
raise "unimplemented type #{type}"
|
||||||
when EOO
|
when EOO
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user