diff --git a/lib/mock_redis/string_methods.rb b/lib/mock_redis/string_methods.rb index bbf9db7..0ef08e7 100644 --- a/lib/mock_redis/string_methods.rb +++ b/lib/mock_redis/string_methods.rb @@ -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