We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d4d07bc commit db53ecaCopy full SHA for db53eca
activesupport/lib/active_support/hash_with_indifferent_access.rb
@@ -68,15 +68,15 @@ def nested_under_indifferent_access
68
end
69
70
def initialize(constructor = nil)
71
- if constructor.respond_to?(:to_hash)
+ if constructor.nil?
72
+ super()
73
+ elsif constructor.respond_to?(:to_hash)
74
super()
75
update(constructor)
76
77
hash = constructor.is_a?(Hash) ? constructor : constructor.to_hash
78
self.default = hash.default if hash.default
79
self.default_proc = hash.default_proc if hash.default_proc
- elsif constructor.nil?
- super()
80
else
81
super(constructor)
82
0 commit comments