test/ruby/bug-13526.rb: Fix to actually refer to an existing file

* Add Thread.report_on_exception=true to catch problems early.
* Increase the number of Thread.pass to let the autoload start.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
eregon 2017-11-19 15:15:49 +00:00
Родитель 764c8bb4d1
Коммит ba26f1f836
1 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -1,5 +1,7 @@
# From https://bugs.ruby-lang.org/issues/13526#note-1
Thread.report_on_exception = true
sleep if $load
$load = true
@ -7,7 +9,7 @@ n = 10
threads = Array.new(n) do
Thread.new do
begin
autoload :Foo, "#{File.dirname($0)}/#{$0}"
autoload :Foo, File.expand_path(__FILE__)
Thread.pass
Foo
ensure
@ -17,4 +19,4 @@ threads = Array.new(n) do
end
Thread.pass while threads.all?(&:stop?)
100.times { Thread.pass }
1000.times { Thread.pass }