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 de403b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/mock_redis/string_methods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit de403b2

Please sign in to comment.