summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2020-03-30 04:47:36 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2020-03-30 04:47:36 +0000
commitc42b57f24ccf341bde2ec74e6cfbea8ac58d610c (patch)
tree7c2ef9406df489aa0a0c4e4a55edd32ada220737 /test
parentb52717cb486fa6650ed07ca9a1e14cc548004210 (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_6@67859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/test_rbconfig.rb9
1 files changed, 9 insertions, 0 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