lib/bson/bson_ruby.rb in bson-0.20.1 vs lib/bson/bson_ruby.rb in bson-1.0
- old
+ new
@@ -114,10 +114,10 @@
serialize_eoo_element(@buf)
if @buf.size > 4 * 1024 * 1024
raise InvalidDocument, "Document is too large (#{@buf.size}). BSON documents are limited to 4MB (#{4 * 1024 * 1024})."
end
@buf.put_int(@buf.size, 0)
- self
+ @buf
end
# Returns the array stored in the buffer.
# Implemented to ensure an API compatible with BSON extension.
def unpack(arg)