Permalink
Browse files

when parsing multiple yml files. use merge instead of replace.

  • Loading branch information...
1 parent 0aa6744 commit 93bd07b5db144c179d37a71d4cecefd09943ebe9 @jorhan jorhan committed Jun 27, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/settingslogic.rb
View
@@ -105,7 +105,7 @@ def initialize(hash_or_file = self.class.source, section = nil)
when Array
hash = hash_or_file.inject({}){|sum, file| File.exists?(file) ? sum.merge!(YAML.load(ERB.new(File.read(file)).result).to_hash) : sum}
hash = hash[self.class.namespace] if self.class.namespace
- self.replace hash
+ self.merge! hash
else
hash = YAML.load(ERB.new(File.read(hash_or_file)).result).to_hash
hash = hash[self.class.namespace] if self.class.namespace

0 comments on commit 93bd07b

Please sign in to comment.