Fixed BINARY length output

This commit is contained in:
Jim Menard 2009-01-12 10:48:04 -05:00
parent e514446603
commit 65b9a6d103
1 changed files with 1 additions and 1 deletions

View File

@ -273,7 +273,7 @@ class BSON
def serialize_binary_element(buf, key, val)
buf.put(BINARY)
self.class.serialize_cstr(buf, key)
buf.put(val.length)
buf.put_int(val.length)
bytes = if RUBY_VERSION >= '1.9'
val.bytes.to_a
else