Skip to content

Commit

Permalink
Allow for passing a string value to the setbit method definitons offs…
Browse files Browse the repository at this point in the history
…et arg (#200)
  • Loading branch information
ziad-abdo authored Jan 5, 2021
1 parent 5393610 commit f08f466
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/mock_redis/string_methods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ def setbit(key, offset, value)

str = data[key] || ''

offset = offset.to_i
offset_of_byte = offset / 8
offset_within_byte = offset % 8

Expand Down

0 comments on commit f08f466

Please sign in to comment.