Skip to content

Commit

Permalink
Fix ruby-head unused block argument warning
Browse files Browse the repository at this point in the history
  • Loading branch information
byroot committed Apr 16, 2024
1 parent 98b8944 commit 49b0d16
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions test/redis_client/middlewares_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ def test_multi_instrumentation
end

module DummyMiddleware
def call(command, _config)
def call(command, _config, &_)
command
end

def call_pipelined(commands, _config)
def call_pipelined(commands, _config, &_)
commands
end
end
Expand Down
4 changes: 2 additions & 2 deletions test/redis_client_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def test_dns_resolution_failure

def test_older_server
fake_redis5_driver = Class.new(RedisClient::RubyConnection) do
def call_pipelined(commands, *)
def call_pipelined(commands, *, &_)
if commands.any? { |c| c == ["HELLO", "3"] }
raise RedisClient::CommandError, "ERR unknown command `HELLO`, with args beginning with: `3`"
else
Expand All @@ -71,7 +71,7 @@ def call_pipelined(commands, *)

def test_redis_6_server_with_missing_hello_command
fake_redis6_driver = Class.new(RedisClient::RubyConnection) do
def call_pipelined(commands, *)
def call_pipelined(commands, *, &_)
if commands.any? { |c| c == ["HELLO", "3"] }
raise RedisClient::CommandError, "ERR unknown command 'HELLO'"
else
Expand Down

0 comments on commit 49b0d16

Please sign in to comment.