Skip to content

Commit

Permalink
do not overload #delete method, which deletes the whole object
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Pepin-Perreault committed Dec 9, 2016
1 parent c483d4a commit 74c63e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/redstruct/types/hash.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def update(hash)
self.connection.mapped_hmset(@key, hash)
end

def delete(*keys)
def remove(*keys)
return self.connection.hdel(@key, keys)
end

Expand All @@ -45,7 +45,7 @@ def incr(key, increment: 1)
end

def decr(key, increment: 1)
return incr(key, (-increment))
return incr(key, -increment)
end

def to_h
Expand Down

0 comments on commit 74c63e2

Please sign in to comment.