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

ruby-changes:24946

From: naruse <ko1@a...>
Date: Thu, 20 Sep 2012 17:05:16 +0900 (JST)
Subject: [ruby-changes:24946] naruse:r36998 (trunk): check @there if it is nil to prevent infinite loop

naruse	2012-09-20 17:05:05 +0900 (Thu, 20 Sep 2012)

  New Revision: 36998

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

  Log:
    check @there if it is nil to prevent infinite loop

  Modified files:
    trunk/test/drb/drbtest.rb

Index: test/drb/drbtest.rb
===================================================================
--- test/drb/drbtest.rb	(revision 36997)
+++ test/drb/drbtest.rb	(revision 36998)
@@ -73,7 +73,7 @@
   def teardown
     @ext.stop_service if defined?(@ext) && @ext
     DRbService.manager.unregist(@service_name)
-    while (@there.to_s rescue nil)
+    while (@there&&@there.to_s rescue nil)
       # nop
     end
     signal = /mswin|mingw/ =~ RUBY_PLATFORM ? :INT : :TERM
@@ -294,7 +294,7 @@
   def teardown
     @ext.stop_service if defined?(@ext) && @ext
     DRbService.manager.unregist(@service_name)
-    while (@there.to_s rescue nil)
+    while (@there&&@there.to_s rescue nil)
       # nop
     end
     signal = /mswin|mingw/ =~ RUBY_PLATFORM ? :INT : :TERM

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

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