diff --git a/lib/settingslogic.rb b/lib/settingslogic.rb index a99acaf..3bb7157 100644 --- a/lib/settingslogic.rb +++ b/lib/settingslogic.rb @@ -113,6 +113,9 @@ def initialize(hash_or_file = self.class.source, section = nil) # Called for dynamically-defined keys, and also the first key deferenced at the top-level, if load! is not used. # Otherwise, create_accessors! (called by new) will have created actual methods for each key. def method_missing(name, *args, &block) + super if name === :to_ary # delegate to Hash + super if name === :to_str # delegate to Hash + key = name.to_s return missing_key("Missing setting '#{key}' in #{@section}") unless has_key? key value = fetch(key)