1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* test/ruby/test_thread.rb (test_handle_interrupt_blocking): check if

exception handling was postponed until sleep.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nagachika 2015-10-05 14:23:54 +00:00
parent 805c20a8e5
commit 3afe772e01
2 changed files with 8 additions and 2 deletions

View file

@ -1,3 +1,8 @@
Mon Oct 5 23:08:17 2015 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
* test/ruby/test_thread.rb (test_handle_interrupt_blocking): check if
exception handling was postponed until sleep.
Mon Oct 5 22:25:49 2015 Tanaka Akira <akr@fsij.org>
* lib/pp.rb: Use frozen_string_literal: true.

View file

@ -637,15 +637,16 @@ class TestThread < Test::Unit::TestCase
th = Thread.start{
Thread.handle_interrupt(Object => :on_blocking){
begin
sleep 0.0001 until r == :ok
sleep 0.0001 until r == :wait
Thread.current.raise RuntimeError
r = :ok
sleep
ensure
th_s.raise e, "raise from ensure", $@
end
}
}
assert_raise(e) {r = :ok; sleep 1}
assert_raise(e) {r = :wait; sleep 1}
ensure
assert_raise(RuntimeError) {th.join(0)}
end