lib/ezframe/config.rb in ezframe-0.2.0 vs lib/ezframe/config.rb in ezframe-0.3.0
- old
+ new
@@ -28,16 +28,16 @@
instr = File.open(filename, &:read)
if instr.index("\#{")
instr = Template.fill_in_text(instr)
end
begin
- yaml = YAML.load(instr)
- rescue
- Logger.info("YAML load error: #{filename}")
+ yaml = YAML.load(instr, symbolize_names: true)
+ rescue => e
+ EzLog.info("YAML load error: #{filename}:#{e}")
return
end
@value_h ||={}
- @value_h.update(yaml.recursively_symbolize_keys) if yaml.length>0
+ @value_h.update(yaml) if yaml.length>0 # .recursively_symbolize_keys
end
def [](k)
@value_h[k] if @value_h
end
\ No newline at end of file