lib/reek/smells/smells.rb in reek-1.0.0 vs lib/reek/smells/smells.rb in reek-1.1.3

- old
+ new

@@ -9,17 +9,14 @@ require 'reek/smells/uncommunicative_name' require 'reek/smells/utility_function' require 'yaml' class Hash - def value_merge!(other) - other.keys.each do |key| - self[key].adopt!(other[key]) - end - self + def push_keys(hash) + keys.each {|key| hash[key].adopt!(self[key]) } end - + def adopt!(other) other.keys.each do |key| ov = other[key] if Array === ov and has_key?(key) self[key] += ov @@ -67,11 +64,10 @@ end def load_local(file) path = File.expand_path(file) all_reekfiles(path).each do |rfile| - cf = YAML.load_file(rfile) - @config.value_merge!(cf) + YAML.load_file(rfile).push_keys(@config) end self end def all_reekfiles(path)