Skip to content

Commit e8fe801

Browse files
committed
RUBY-1092 Update #to_bson methods signatures for bson 4.1 validating_keys arg
1 parent 5179076 commit e8fe801

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

lib/mongo/dbref.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def initialize(collection, id, database = nil)
8484
# @return [ String ] The raw BSON.
8585
#
8686
# @since 2.1.0
87-
def to_bson(buffer = BSON::ByteBuffer.new)
87+
def to_bson(buffer = BSON::ByteBuffer.new, validating_keys = nil)
8888
as_json.to_bson(buffer)
8989
end
9090

lib/mongo/grid/file/chunk.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def initialize(document)
135135
# @return [ String ] The raw BSON data.
136136
#
137137
# @since 2.0.0
138-
def to_bson(buffer = BSON::ByteBuffer.new)
138+
def to_bson(buffer = BSON::ByteBuffer.new, validating_keys = nil)
139139
document.to_bson(buffer)
140140
end
141141

lib/mongo/grid/file/info.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,9 @@ def md5
198198
# @return [ String ] The raw BSON data.
199199
#
200200
# @since 2.0.0
201-
def to_bson(encoded = ''.force_encoding(BSON::BINARY))
201+
def to_bson(buffer = BSON::ByteBuffer.new, validating_keys = nil)
202202
document[:md5] ||= @client_md5.hexdigest
203-
document.to_bson(encoded)
203+
document.to_bson(buffer)
204204
end
205205

206206
# Get the upload date.

0 commit comments

Comments
 (0)