diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-03-25 22:00:15 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-03-25 22:09:28 +0900 |
commit | 4adb2d655dcd54b28366b4d17e86b21e2b622cd1 (patch) | |
tree | cf0c6f8f6372ccbf9e80097fa9db1e5b2dfcc57d /test/test_rbconfig.rb | |
parent | 48a5c155fa850fd0c0ea8b5b9219967b6e7181f9 (diff) |
Make RbConfig::CONFIG values mutable [Bug #16738]
As `RbConfig.expand` modifies the argument and involved `CONFIG`
values, its values should be mutable.
Diffstat (limited to 'test/test_rbconfig.rb')
-rw-r--r-- | test/test_rbconfig.rb | 9 |
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 |