Skip to content
Browse files

make sure yaml_hash is really a Hash before merge

  • Loading branch information...
1 parent 153d9e7 commit 663dff706e7b3401153e67686b67ce0aa604fb0a @yhuang committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/timed_config.rb
View
2 lib/timed_config.rb
@@ -49,7 +49,7 @@ def reload(force=false)
@config = {}
p_array.each do |p|
yaml_hash = YAML::load(File.open p) if File.exists? p
- @config.merge!(yaml_hash)
+ @config.merge!(yaml_hash) if yaml_hash.is_a?(Hash)
end
else
@config = nil

0 comments on commit 663dff7

Please sign in to comment.
Something went wrong with that request. Please try again.