aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/bug-13526.rb
diff options
context:
space:
mode:
authoreregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-19 15:15:49 +0000
committereregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-19 15:15:49 +0000
commitba26f1f836e2ae9c9b5f0b54e55195e22016af3f (patch)
treed679b1e62f7e3173d8b80590a8bda79a6074fab8 /test/ruby/bug-13526.rb
parent764c8bb4d1cf41d1fd5b0023aaa0f3bd526ad576 (diff)
downloadruby-ba26f1f836e2ae9c9b5f0b54e55195e22016af3f.tar.gz
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
Diffstat (limited to 'test/ruby/bug-13526.rb')
-rw-r--r--test/ruby/bug-13526.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/ruby/bug-13526.rb b/test/ruby/bug-13526.rb
index f42e1913ce..e0b8e981cc 100644
--- a/test/ruby/bug-13526.rb
+++ b/test/ruby/bug-13526.rb
@@ -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 }