1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Get rid of multibyte prefix to tmpdir

This commit is contained in:
Nobuyoshi Nakada 2021-04-05 21:20:51 +09:00 committed by NARUSE, Yui
parent 6cdc36a60d
commit 0fb782ee38

View file

@ -371,15 +371,15 @@ class TestRequire < Test::Unit::TestCase
bug = '[ruby-list:49994] path in ospath'
base = "test_load\u{3042 3044 3046 3048 304a}".encode(Encoding::Windows_31J)
path = nil
Tempfile.create([base, ".rb"]) do |t|
path = t.path
Dir.mktmpdir do |dir|
path = File.join(dir, base+".rb")
assert_raise_with_message(LoadError, /#{base}/) {
load(File.join(File.dirname(path), base))
load(File.join(dir, base))
}
t.puts "warn 'ok'"
t.close
File.open(path, "w+b") do |t|
t.puts "warn 'ok'"
end
assert_include(path, base)
assert_warn("ok\n", bug) {
assert_nothing_raised(LoadError, bug) {