diff options
Diffstat (limited to 'activesupport/lib/active_support/ordered_options.rb')
-rw-r--r-- | activesupport/lib/active_support/ordered_options.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/ordered_options.rb b/activesupport/lib/active_support/ordered_options.rb index 2b67e72cff..99c6c5a0c0 100644 --- a/activesupport/lib/active_support/ordered_options.rb +++ b/activesupport/lib/active_support/ordered_options.rb @@ -36,8 +36,12 @@ module ActiveSupport #:nodoc: end class InheritableOptions < OrderedOptions - def initialize(parent) - super() { |h,k| parent[k] } + def initialize(parent = nil) + if parent + super() { |h,k| parent[k] } + else + super() + end end def inheritable_copy |