diff options
author | Kazuhiro NISHIYAMA <[email protected]> | 2019-11-19 17:34:43 +0900 |
---|---|---|
committer | Kazuhiro NISHIYAMA <[email protected]> | 2019-11-19 17:36:47 +0900 |
commit | 822d7ae31659e4ab60c4d1aa6d088577d6bc74b0 () | |
tree | dae122971fa2013a26aabcb297032babaa6e2643 | |
parent | 0b8c73aa65add5c57b46b0cfdf4e661508802172 (diff) |
Add a test
and rename from b.rb [ruby-core:95055] [Bug #16177]
-rw-r--r-- | test/ruby/test_autoload.rb | 26 |
1 files changed, 23 insertions, 3 deletions
@@ -323,7 +323,7 @@ p Foo::Bar def test_autoload_same_file Dir.mktmpdir('autoload') do |tmpdir| - File.write("#{tmpdir}/b.rb", "#{<<~'begin;'}\n#{<<~'end;'}") begin; module Foo; end module Bar; end @@ -331,8 +331,8 @@ p Foo::Bar 3.times do # timing-dependent, needs a few times to hit [Bug #14742] assert_separately(%W[-I #{tmpdir}], "#{<<-'begin;'}\n#{<<-'end;'}") begin; - autoload :Foo, 'b' - autoload :Bar, 'b' t1 = Thread.new do Foo end t2 = Thread.new do Bar end t1.join @@ -345,6 +345,26 @@ p Foo::Bar end end def test_no_ assert_no_memory_([], '', <<~'end;', 'many autoloads', timeout: 60) 200000.times do |i| |