[前][次][番号順一覧][スレッド一覧]

ruby-changes:39962

From: nagachika <ko1@a...>
Date: Mon, 5 Oct 2015 23:24:01 +0900 (JST)
Subject: [ruby-changes:39962] nagachika:r52043 (trunk): * test/ruby/test_thread.rb (test_handle_interrupt_blocking): check if

nagachika	2015-10-05 23:23:54 +0900 (Mon, 05 Oct 2015)

  New Revision: 52043

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=52043

  Log:
    * test/ruby/test_thread.rb (test_handle_interrupt_blocking): check if
      exception handling was postponed until sleep.

  Modified files:
    trunk/ChangeLog
    trunk/test/ruby/test_thread.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 52042)
+++ ChangeLog	(revision 52043)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Mon Oct  5 23:08:17 2015  CHIKANAGA Tomoyuki  <nagachika@r...>
+
+	* 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@f...>
 
 	* lib/pp.rb: Use frozen_string_literal: true.
Index: test/ruby/test_thread.rb
===================================================================
--- test/ruby/test_thread.rb	(revision 52042)
+++ test/ruby/test_thread.rb	(revision 52043)
@@ -637,15 +637,16 @@ class TestThread < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_thread.rb#L637
       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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]