зеркало из https://github.com/github/ruby.git
Make RbConfig::CONFIG values mutable [Bug #16738]
As `RbConfig.expand` modifies the argument and involved `CONFIG` values, its values should be mutable.
This commit is contained in:
Родитель
48a5c155fa
Коммит
4adb2d655d
|
@ -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
|
||||
|
|
|
@ -268,7 +268,7 @@ print <<EOS if $unicode_emoji_version
|
|||
CONFIG["UNICODE_EMOJI_VERSION"] = #{$unicode_emoji_version.dump}
|
||||
EOS
|
||||
print <<EOS if /darwin/ =~ arch
|
||||
CONFIG["SDKROOT"] = ENV["SDKROOT"] || "" # don't run xcrun every time, usually useless.
|
||||
CONFIG["SDKROOT"] = "\#{ENV['SDKROOT']}" # don't run xcrun every time, usually useless.
|
||||
EOS
|
||||
print <<EOS
|
||||
CONFIG["archdir"] = "$(rubyarchdir)"
|
||||
|
|
Загрузка…
Ссылка в новой задаче