diff options
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/configurable.rb | 2 | ||||
-rw-r--r-- | activesupport/lib/active_support/ordered_options.rb | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/activesupport/lib/active_support/configurable.rb b/activesupport/lib/active_support/configurable.rb index 36634bd7f3..3d91560833 100644 --- a/activesupport/lib/active_support/configurable.rb +++ b/activesupport/lib/active_support/configurable.rb @@ -30,7 +30,7 @@ module ActiveSupport superclass.config.inheritable_copy else # create a new "anonymous" class that will host the compiled reader methods - Class.new(Configuration).new({}) + Class.new(Configuration).new end end 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 |