From de403b2e4ceb11b51493cf1a0a7b8e128b1fff3a Mon Sep 17 00:00:00 2001 From: Ochi-Shoichi5539 Date: Wed, 17 Jan 2024 21:41:00 +0900 Subject: [PATCH] extend set method to accept a third positional argument --- lib/mock_redis/string_methods.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/mock_redis/string_methods.rb b/lib/mock_redis/string_methods.rb index f6fb5a4..bb43f7f 100644 --- a/lib/mock_redis/string_methods.rb +++ b/lib/mock_redis/string_methods.rb @@ -212,8 +212,8 @@ def mapped_msetnx(hash) # Parameter list required to ensure the ArgumentError is returned correctly # rubocop:disable Metrics/ParameterLists - def set(key, value, ex: nil, px: nil, exat: nil, pxat: nil, nx: nil, xx: nil, keepttl: nil, - get: nil) + def set(key, value, _hash = nil, ex: nil, px: nil, exat: nil, pxat: nil, nx: nil, xx: nil, + keepttl: nil, get: nil) key = key.to_s retval = self.get(key) if get