Skip to content

Commit 74c63e2

Browse files
author
Nicolas Pepin-Perreault
committed
do not overload #delete method, which deletes the whole object
1 parent c483d4a commit 74c63e2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/redstruct/types/hash.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def update(hash)
2828
self.connection.mapped_hmset(@key, hash)
2929
end
3030

31-
def delete(*keys)
31+
def remove(*keys)
3232
return self.connection.hdel(@key, keys)
3333
end
3434

@@ -45,7 +45,7 @@ def incr(key, increment: 1)
4545
end
4646

4747
def decr(key, increment: 1)
48-
return incr(key, (-increment))
48+
return incr(key, -increment)
4949
end
5050

5151
def to_h

0 commit comments

Comments
 (0)