From 49b0d16b8c8934a8d3ee8c9ac4121d04919b3c9b Mon Sep 17 00:00:00 2001 From: Jean Boussier Date: Tue, 16 Apr 2024 14:19:20 +0200 Subject: [PATCH] Fix ruby-head unused block argument warning --- test/redis_client/middlewares_test.rb | 4 ++-- test/redis_client_test.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/redis_client/middlewares_test.rb b/test/redis_client/middlewares_test.rb index 067305f..7c2b350 100644 --- a/test/redis_client/middlewares_test.rb +++ b/test/redis_client/middlewares_test.rb @@ -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 diff --git a/test/redis_client_test.rb b/test/redis_client_test.rb index c324163..dc50a55 100644 --- a/test/redis_client_test.rb +++ b/test/redis_client_test.rb @@ -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 @@ -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