summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2020-03-30 22:47:56 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2020-03-30 22:47:56 +0000
commitd4e1eb1dfde6585b134c113f7b7cf73d69aa5f2e (patch)
tree8ec92613504787e9937b87fa87fbf233225ae2c8
parent209f34515819ae4147bbd76e8b8efa9f6261cf1d (diff)
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
-rw-r--r--test/test_rbconfig.rb9
-rwxr-xr-xtool/mkconfig.rb2
-rw-r--r--version.h2
3 files changed, 11 insertions, 2 deletions
diff --git a/test/test_rbconfig.rb b/test/test_rbconfig.rb
index 1bbf01b9a6..fcbbbd8500 100644
--- a/test/test_rbconfig.rb
+++ b/test/test_rbconfig.rb
@@ -51,4 +51,13 @@ class TestRbConfig < Test::Unit::TestCase
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 d6c86b4803..52ec6a85d7 100755
--- a/tool/mkconfig.rb
+++ b/tool/mkconfig.rb
@@ -245,7 +245,7 @@ print <<EOS if $unicode_version
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 dca56748e1..10088b7a3e 100644
--- a/version.h
+++ b/version.h
@@ -1,6 +1,6 @@
#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