aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/ruby/test_autoload.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/ruby/test_autoload.rb b/test/ruby/test_autoload.rb
index 2b37e44c3f..bfed40e9f4 100644
--- a/test/ruby/test_autoload.rb
+++ b/test/ruby/test_autoload.rb
@@ -151,6 +151,7 @@ p Foo::Bar
end
def add_autoload(path)
+ (@autoload_paths ||= []) << path
eval <<-END
class ::Object
autoload :AutoloadTest, #{path.dump}
@@ -159,6 +160,7 @@ p Foo::Bar
end
def remove_autoload_constant
+ $".replace($" - @autoload_paths)
eval <<-END
class ::Object
remove_const(:AutoloadTest)