./lib/clean-hash/base.rb in clean-hash-0.4.0 vs ./lib/clean-hash/base.rb in clean-hash-0.4.1
- old
+ new
@@ -25,10 +25,10 @@
data = @data[key.to_sym]
data = @data[key.to_s] if data.nil?
if data.nil?
if @is_strict && !keys.include?(key.to_sym)
- raise NoMethodError, 'Clean hash: key "%s" not found' % key
+ raise NoMethodError, 'Clean hash: key "%s" not found (%s)' % [key, keys]
else
nil
end
elsif data.is_a?(Hash)
CleanHash.new data, @mode