lib/redis/value.rb in redis-objects-0.9.1 vs lib/redis/value.rb in redis-objects-1.0.0
- old
+ new
@@ -9,10 +9,10 @@
include Redis::Helpers::CoreCommands
attr_reader :key, :options
def initialize(key, *args)
super(key, *args)
- redis.setnx(key, marshal(@options[:default])) if @options[:default]
+ redis.setnx(key, marshal(@options[:default])) if !@options[:default].nil?
end
def value=(val)
if val.nil?
delete