ruby-changes:60597
From: usa <ko1@a...>
Date: Tue, 31 Mar 2020 07:48:07 +0900 (JST)
Subject: [ruby-changes:60597] d4e1eb1dfd (ruby_2_5): merge revision(s) 4adb2d655dcd54b28366b4d17e86b21e2b622cd1: [Backport #16738]
https://git.ruby-lang.org/ruby.git/commit/?id=d4e1eb1dfd From d4e1eb1dfde6585b134c113f7b7cf73d69aa5f2e Mon Sep 17 00:00:00 2001 From: usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> Date: Mon, 30 Mar 2020 22:47:56 +0000 Subject: merge revision(s) 4adb2d655dcd54b28366b4d17e86b21e2b622cd1: [Backport #16738] Make RbConfig::CONFIG values mutable [Bug #16738] As `RbConfig.expand` modifies the argument and involved `CONFIG` values, its values should be mutable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_5@67872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e diff --git a/test/test_rbconfig.rb b/test/test_rbconfig.rb index 1bbf01b..fcbbbd8 100644 --- a/test/test_rbconfig.rb +++ b/test/test_rbconfig.rb @@ -51,4 +51,13 @@ class TestRbConfig < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/test_rbconfig.rb#L51 assert_match(/\$\(sitearch|\$\(rubysitearchprefix\)/, val, "#{key} #{bug7823}") end end + + if /darwin/ =~ RUBY_PLATFORM + def test_sdkroot + assert_separately([{"SDKROOT" => "$(prefix)/SDKRoot"}], "#{<<~"begin;"}\n#{<<~'end;'}") + begin; + assert_equal RbConfig::CONFIG["prefix"]+"/SDKRoot", RbConfig::CONFIG["SDKROOT"] + end; + end + end end diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb index d6c86b4..52ec6a8 100755 --- a/tool/mkconfig.rb +++ b/tool/mkconfig.rb @@ -245,7 +245,7 @@ print <<EOS if $unicode_version https://github.com/ruby/ruby/blob/trunk/tool/mkconfig.rb#L245 CONFIG["UNICODE_VERSION"] = #{$unicode_version.dump} EOS print <<EOS if /darwin/ =~ arch - CONFIG["SDKROOT"] = ENV["SDKROOT"] || "" # don't run xcrun everytime, usually useless. + CONFIG["SDKROOT"] = "\#{ENV['SDKROOT']}" # don't run xcrun every time, usually useless. EOS print <<EOS CONFIG["archdir"] = "$(rubyarchdir)" diff --git a/version.h b/version.h index dca5674..10088b7 100644 --- a/version.h +++ b/version.h @@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/version.h#L1 #define RUBY_VERSION "2.5.8" #define RUBY_RELEASE_DATE "2020-03-31" -#define RUBY_PATCHLEVEL 221 +#define RUBY_PATCHLEVEL 222 #define RUBY_RELEASE_YEAR 2020 #define RUBY_RELEASE_MONTH 3 -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/