./lib/clean-hash/base.rb in clean-hash-0.3.0 vs ./lib/clean-hash/base.rb in clean-hash-0.3.1
- old
+ new
@@ -24,10 +24,11 @@
def [] key
__value_for key.to_s
end
def []= key, value
- __error_set
+ __error_set if @is_strict && !key?(key)
+ @data[key.to_sym] = value
end
def key? name
__value_for name
true