summaryrefslogtreecommitdiff
path: root/test/ruby/test_require.rb
diff options
context:
space:
mode:
authorKazuhiro NISHIYAMA <zn@mbf.nifty.com>2019-12-10 18:31:01 +0900
committerKazuhiro NISHIYAMA <znz@users.noreply.github.com>2019-12-11 12:35:51 +0900
commit1ed0212bcf76ec244ca5b75c65f09e5b04158377 (patch)
tree568a56b9a14edc85d05250a261f44ca88ec2c909 /test/ruby/test_require.rb
parent85e43e1dfecef69b935c48c235cc20f21bd4f0d4 (diff)
Do not load files in build directory
related https://bugs.ruby-lang.org/issues/16177
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/2736
Diffstat (limited to 'test/ruby/test_require.rb')
-rw-r--r--test/ruby/test_require.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/ruby/test_require.rb b/test/ruby/test_require.rb
index e310ac7c70..05dc18cd17 100644
--- a/test/ruby/test_require.rb
+++ b/test/ruby/test_require.rb
@@ -818,9 +818,9 @@ class TestRequire < Test::Unit::TestCase
rescue NotImplementedError, Errno::EACCES
skip "File.symlink is not implemented"
end
- File.write(File.join(tmp, "real/a.rb"), "print __FILE__")
- result = IO.popen([EnvUtil.rubybin, "-I#{tmp}/symlink", "-e", "require 'a.rb'"], &:read)
- assert_operator(result, :end_with?, "/real/a.rb")
+ File.write(File.join(tmp, "real/test_symlink_load_path.rb"), "print __FILE__")
+ result = IO.popen([EnvUtil.rubybin, "-I#{tmp}/symlink", "-e", "require 'test_symlink_load_path.rb'"], &:read)
+ assert_operator(result, :end_with?, "/real/test_symlink_load_path.rb")
}
end