lib/contrast/config/base_configuration.rb in contrast-agent-4.6.0 vs lib/contrast/config/base_configuration.rb in contrast-agent-4.7.0

- old
+ new

@@ -15,14 +15,11 @@ BOOLEANS = [true, false].cs__freeze attr_reader :map alias_method :to_hash, :map - def_delegators :@map, :empty?, :key?, - :delete, - :fetch, :[], :[]=, - :each, :each_pair, :each_key, :each_value + def_delegators :@map, :empty?, :key?, :delete, :fetch, :[], :[]=, :each, :each_pair, :each_key, :each_value EMPTY_VALUE = :EMPTY_VALUE def initialize hsh = {}, keys = {} @map = {} @@ -33,10 +30,12 @@ current_level = self dot_path_array[0...-1].each do |segment| current_level = current_level.send(segment) if current_level.cs__respond_to?(segment) end last_entry = dot_path_array[-1] - current_level.send("#{ last_entry }=", value) if current_level.nil? == false && current_level.cs__respond_to?(last_entry) + if current_level.nil? == false && current_level.cs__respond_to?(last_entry) + current_level.send("#{ last_entry }=", value) + end nil end def nil? @map.empty?