Skip to content

Commit b63cb77

Browse files
committed
Performance/RedundantMerge
1 parent 13dfc46 commit b63cb77

File tree

3 files changed

+2
-10
lines changed

3 files changed

+2
-10
lines changed

.rubocop_todo.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,6 @@ Naming/HeredocDelimiterNaming:
5151
Exclude:
5252
- 'tasks/compile.rake'
5353

54-
# Offense count: 2
55-
# Cop supports --auto-correct.
56-
# Configuration parameters: MaxKeyValuePairs.
57-
Performance/RedundantMerge:
58-
Exclude:
59-
- 'spec/mysql2/client_spec.rb'
60-
- 'spec/mysql2/statement_spec.rb'
61-
6254
# Offense count: 3
6355
# Cop supports --auto-correct.
6456
# Configuration parameters: AutoCorrect.

spec/mysql2/client_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ def run_gc
493493
end
494494

495495
it "should allow changing query options for subsequent queries" do
496-
@client.query_options.merge!(:something => :else)
496+
@client.query_options[:something] = :else
497497
result = @client.query "SELECT 1"
498498
expect(@client.query_options[:something]).to eql(:else)
499499
expect(result.instance_variable_get('@query_options')[:something]).to eql(:else)

spec/mysql2/statement_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ def stmt_count
196196
end
197197

198198
it "should warn but still work if cache_rows is set to false" do
199-
@client.query_options.merge!(:cache_rows => false)
199+
@client.query_options[:cache_rows] = false
200200
statement = @client.prepare 'SELECT 1'
201201
result = nil
202202
expect { result = statement.execute.to_a }.to output(/:cache_rows is forced for prepared statements/).to_stderr

0 commit comments

Comments
 (0)