lib/mongo/protocol/serializers.rb in mongo-2.12.4 vs lib/mongo/protocol/serializers.rb in mongo-2.13.0.beta1
- old
+ new
@@ -1,6 +1,6 @@
-# Copyright (C) 2014-2019 MongoDB, Inc.
+# Copyright (C) 2014-2020 MongoDB Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
@@ -438,18 +438,15 @@
end
# Deserializes bytes from the byte buffer.
#
# @param [ BSON::ByteBuffer ] buffer Buffer containing the value to read.
- # @param [ Hash ] options The method options.
+ # @param [ Integer ] num_bytes Number of bytes to read.
#
- # @option options [ Integer ] num_bytes Number of bytes to read.
- #
# @return [ String ] The bytes.
#
# @since 2.5.0
- def self.deserialize(buffer, options = {})
- num_bytes = options[:num_bytes]
+ def self.deserialize(buffer, num_bytes = nil)
buffer.get_bytes(num_bytes || buffer.length)
end
end
end
end