summaryrefslogtreecommitdiff
path: root/test/ruby/test_autoload.rb
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2020-01-28 17:53:20 +0900
committerKoichi Sasada <ko1@atdot.net>2020-01-28 17:55:18 +0900
commit151533e4bc9dff8efefb251dd25b1d57d3082d19 (patch)
tree563af72a8086d334093daf10a78e638d867f85bf /test/ruby/test_autoload.rb
parent83d6487ae5c5df6c463373b36ccf1bee3f91d386 (diff)
support multi-run for test/ruby/test_autoload.rb
Another test defines Object::A, but it will fail 2nd test.
Diffstat (limited to 'test/ruby/test_autoload.rb')
-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 c23e0cfb1f..b3ccf183ec 100644
--- a/test/ruby/test_autoload.rb
+++ b/test/ruby/test_autoload.rb
@@ -66,6 +66,8 @@ p Foo::Bar
end
def test_autoload_with_unqualified_file_name # [ruby-core:69206]
+ Object.send(:remove_const, :A) if Object.const_defined?(:A)
+
lp = $LOAD_PATH.dup
lf = $LOADED_FEATURES.dup