diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb index 49b841f..c0e230d 100755 --- a/tool/mkconfig.rb +++ b/tool/mkconfig.rb @@ -267,13 +267,11 @@ def RbConfig::expand(val, config = CONFIG) var end } - val.replace(newval) unless newval == val - val - end - CONFIG.each_value do |val| - RbConfig::expand(val) + newval != val ? newval : val end + CONFIG.update(CONFIG) { |_, val| RbConfig::expand(val) } + # returns the absolute pathname of the ruby command. def RbConfig.ruby File.join(