Skip to content

Commit

Permalink
extend set method to accept a third positional argument
Browse files Browse the repository at this point in the history
  • Loading branch information
sho-work committed Jan 17, 2024
1 parent 3b6849e commit d600e40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mock_redis/string_methods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ 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,
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
Expand Down

0 comments on commit d600e40

Please sign in to comment.