mirror of
https://github.com/ruby/ruby.git
synced 2026-01-27 04:24:23 +00:00
Fix flaky require test
This commit is contained in:
parent
d17ce4bd05
commit
e4219e2742
Notes:
git
2025-10-29 01:24:32 +00:00
Merged: https://github.com/ruby/ruby/pull/14977 Merged-By: luke-gru <luke.gru@gmail.com>
@ -857,7 +857,13 @@ class TestRequire < Test::Unit::TestCase
|
||||
def to_path = @path
|
||||
end
|
||||
|
||||
def create_ruby_file = Tempfile.open(["test", ".rb"]).path
|
||||
FILES = []
|
||||
|
||||
def create_ruby_file
|
||||
file = Tempfile.open(["test", ".rb"])
|
||||
FILES << file
|
||||
file.path
|
||||
end
|
||||
|
||||
require MyString.new(create_ruby_file)
|
||||
$LOADED_FEATURES.unshift(create_ruby_file)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user