lib/redis/hash_key.rb in redis-objects-0.9.1 vs lib/redis/hash_key.rb in redis-objects-1.0.0
- old
+ new
@@ -156,20 +156,22 @@
# Increment value by float at field. Redis: HINCRBYFLOAT
def incrbyfloat(field, by=1.0)
ret = redis.hincrbyfloat(key, field, by)
unless ret.is_a? Array
- ret.to_i
+ ret.to_f
else
nil
end
end
# Decrement value by float at field. Redis: HINCRBYFLOAT
def decrbyfloat(field, by=1.0)
incrbyfloat(field, -by)
end
- expiration_filter :[]=, :store, :bulk_set, :fill, :incrby
+ expiration_filter :[]=, :store, :bulk_set, :fill,
+ :incrby, :incr, :incrbyfloat,
+ :decrby, :decr, :decrbyfloat
end
end