lib/redis/store/marshalling.rb in redis-store-1.2.0 vs lib/redis/store/marshalling.rb in redis-store-1.3.0

- old
+ new

@@ -22,9 +22,19 @@ super(*keys).map do |result| _unmarshal result, options end end + def mset(*args) + options = args.pop if args.length.odd? + updates = [] + args.each_slice(2) do |(key, value)| + updates << encode(key) + _marshal(value, options) { |v| updates << encode(v) } + end + super(*updates) + end + private def _marshal(val, options) yield marshal?(options) ? Marshal.dump(val) : val end