diff options
author | Jeremy Evans <code@jeremyevans.net> | 2021-09-18 17:37:35 -0700 |
---|---|---|
committer | Jeremy Evans <code@jeremyevans.net> | 2021-09-18 17:37:35 -0700 |
commit | 162ad65fdd5e3f826eff4e0208c58a21151e993a (patch) | |
tree | 37f725f4561606beb314b31d15218fca318f4715 /test/ruby | |
parent | f9fd04ffbc334bb5a3e8a0898ad201ad1c11709d (diff) |
Revert "Do not load file with same realpath twice when requiring"
This reverts commit ddb85c5d2bdf75a83eb163856508691a7436b446.
This commit causes unexpected warnings in TestTranscode#test_loading_race
occasionally in CI.
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_require.rb | 30 |
1 files changed, 2 insertions, 28 deletions
diff --git a/test/ruby/test_require.rb b/test/ruby/test_require.rb index e996c6d641..401b274ef6 100644 --- a/test/ruby/test_require.rb +++ b/test/ruby/test_require.rb @@ -434,32 +434,6 @@ class TestRequire < Test::Unit::TestCase } end - def test_relative_symlink_realpath - Dir.mktmpdir {|tmp| - Dir.chdir(tmp) { - Dir.mkdir "a" - File.open("a/a.rb", "w") {|f| f.puts 'require_relative "b"' } - File.open("a/b.rb", "w") {|f| f.puts '$t += 1' } - Dir.mkdir "b" - File.binwrite("c.rb", <<~RUBY) - $t = 0 - $:.unshift(File.expand_path('../b', __FILE__)) - require "b" - require "a" - print $t - RUBY - begin - File.symlink("../a/a.rb", "b/a.rb") - File.symlink("../a/b.rb", "b/b.rb") - result = IO.popen([EnvUtil.rubybin, "c.rb"], &:read) - assert_equal("1", result, "bug17885 [ruby-core:104010]") - rescue NotImplementedError, Errno::EACCES - skip "File.symlink is not implemented" - end - } - } - end - def test_frozen_loaded_features bug3756 = '[ruby-core:31913]' assert_in_out_err(['-e', '$LOADED_FEATURES.freeze; require "ostruct"'], "", @@ -737,8 +711,8 @@ class TestRequire < Test::Unit::TestCase assert_in_out_err([{"RUBYOPT" => nil}, "-", script.path], "#{<<~"begin;"}\n#{<<~"end;"}", %w(:ok), [], bug7530, timeout: 60) begin; PATH = ARGV.shift - THREADS = 30 - ITERATIONS_PER_THREAD = 300 + THREADS = 4 + ITERATIONS_PER_THREAD = 1000 THREADS.times.map { Thread.new do |