From f08f466ff1bad9335fa32756486fb9d3d3e24c44 Mon Sep 17 00:00:00 2001 From: Ziad Abdo Date: Mon, 4 Jan 2021 21:21:29 -0800 Subject: [PATCH] Allow for passing a string value to the setbit method definitons offset arg (#200) --- lib/mock_redis/string_methods.rb | 1 + 1 file changed, 1 insertion(+) 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