lib/fakeredis/zset.rb in fakeredis-0.8.0 vs lib/fakeredis/zset.rb in fakeredis-0.9.0

- old
+ new

@@ -24,10 +24,10 @@ # Originally lifted from redis-rb def _floatify(str, increment = true) if (( inf = str.to_s.match(/^([+-])?inf/i) )) (inf[1] == "-" ? -1.0 : 1.0) / 0.0 - elsif (( number = str.to_s.match(/^\((\d+)/i) )) + elsif (( number = str.to_s.match(/^\((-?\d+)/i) )) number[1].to_i + (increment ? 1 : -1) else Float str.to_s end rescue ArgumentError