Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,6 @@ Lint/UnderscorePrefixedVariableName:
- 'spec/mongo/server/monitor_spec.rb'
- 'spec/support/local_resource_registry.rb'

# Offense count: 2
Lint/UnreachableCode:
Exclude:
- 'lib/mongo/protocol/serializers.rb'
- 'spec/runners/unified/test.rb'

# Offense count: 2
# Configuration parameters: AllowedPatterns.
# AllowedPatterns: (?-mix:(exactly|at_least|at_most)\(\d+\)\.times)
Expand Down
10 changes: 1 addition & 9 deletions lib/mongo/protocol/serializers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -319,16 +319,8 @@ def self.serialize(buffer, value, max_bson_size = nil, _validating_keys = nil)
# @return [ Array<BSON::Document> ] Deserialized section.
#
# @since 2.5.0
def self.deserialize(buffer)
def self.deserialize(buffer, _options = {})
raise NotImplementedError

start_size = buffer.length
section_size = buffer.get_int32 # get the size
end_size = start_size - section_size
buffer.get_cstring # get the identifier
documents = []
documents << BSON::Document.from_bson(buffer) until buffer.length == end_size
documents
end
end
end
Expand Down
1 change: 0 additions & 1 deletion spec/runners/unified/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,6 @@ def execute_operation(op, propagate_errors: false)
public_send(method_name, op)
rescue Mongo::Error, bson_error, Mongo::Auth::Unauthorized, ArgumentError => e
if expected_error.use('isTimeoutError') && !e.is_a?(Mongo::Error::TimeoutError)
raise e
raise Error::ErrorMismatch, %,Expected TimeoutError ("isTimeoutError") but got #{e},
end
# isClientError doesn't actually mean a client error.
Expand Down
Loading