summaryrefslogtreecommitdiff
path: root/test/ruby/test_autoload.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_autoload.rb')
-rw-r--r--test/ruby/test_autoload.rb18
1 files changed, 14 insertions, 4 deletions
diff --git a/test/ruby/test_autoload.rb b/test/ruby/test_autoload.rb
index 607f0e3355..82bf2d9d2c 100644
--- a/test/ruby/test_autoload.rb
+++ b/test/ruby/test_autoload.rb
@@ -224,7 +224,7 @@ p Foo::Bar
Kernel.module_eval do
alias old_require require
end
- Namespace.module_eval do
+ Ruby::Box.module_eval do
alias old_require require
end
called_with = []
@@ -232,7 +232,7 @@ p Foo::Bar
called_with << path
old_require path
end
- Namespace.send :define_method, :require do |path|
+ Ruby::Box.send :define_method, :require do |path|
called_with << path
old_require path
end
@@ -243,7 +243,7 @@ p Foo::Bar
alias require old_require
undef old_require
end
- Namespace.module_eval do
+ Ruby::Box.module_eval do
undef require
alias require old_require
undef old_require
@@ -574,7 +574,7 @@ p Foo::Bar
autoload_path = File.join(tmpdir, "autoload_parallel_race.rb")
File.write(autoload_path, 'module Foo; end; module Bar; end')
- assert_separately([], <<-RUBY, timeout: 100)
+ assert_ruby_status([], <<-RUBY, timeout: 100)
autoload_path = #{File.realpath(autoload_path).inspect}
# This should work with no errors or failures.
@@ -613,4 +613,14 @@ p Foo::Bar
RUBY
end
end
+
+ private
+
+ def assert_separately(*args, **kwargs)
+ super(*args, timeout: 60, **kwargs)
+ end
+
+ def assert_ruby_status(*args, **kwargs)
+ super(*args, timeout: 60, **kwargs)
+ end
end