lib/redis/store/marshalling.rb in redis-store-1.1.3 vs lib/redis/store/marshalling.rb in redis-store-1.1.4
- old
+ new
@@ -41,10 +41,11 @@
result && result.size > 0 && marshal?(options)
end
if defined?(Encoding)
def encode(string)
- string.to_s.force_encoding(Encoding::BINARY)
+ key = string.to_s.dup
+ key.force_encoding(Encoding::BINARY)
end
else
def encode(string)
string
end