From 9c42d71cc1d224fa41e8f927010264810bbb4ba3 Mon Sep 17 00:00:00 2001 From: Dims Date: Wed, 15 May 2013 15:45:12 +0600 Subject: [PATCH] Hash replaced with ActiveSupport::HashWithIndifferentAccess --- lib/settingslogic.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/settingslogic.rb b/lib/settingslogic.rb index a99acaf..3f1535c 100644 --- a/lib/settingslogic.rb +++ b/lib/settingslogic.rb @@ -100,7 +100,7 @@ def initialize(hash_or_file = self.class.source, section = nil) self.replace hash_or_file else file_contents = open(hash_or_file).read - hash = file_contents.empty? ? {} : YAML.load(ERB.new(file_contents).result).to_hash + hash = (file_contents.empty? ? {} : YAML.load(ERB.new(file_contents).result)).to_hash.with_indifferent_access if self.class.namespace hash = hash[self.class.namespace] or return missing_key("Missing setting '#{self.class.namespace}' in #{hash_or_file}") end