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

ruby-changes:7775

From: suke <ko1@a...>
Date: Thu, 11 Sep 2008 20:17:58 +0900 (JST)
Subject: [ruby-changes:7775] Ruby:r19296 (trunk): * test/win32ole/test_err_in_callback.rb (teardown): get rid

suke	2008-09-11 20:15:43 +0900 (Thu, 11 Sep 2008)

  New Revision: 19296

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

  Log:
    * test/win32ole/test_err_in_callback.rb (teardown): get rid
      of infinite loop.

  Modified files:
    trunk/ChangeLog
    trunk/test/win32ole/test_err_in_callback.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 19295)
+++ ChangeLog	(revision 19296)
@@ -1,3 +1,8 @@
+Thu Sep 11 20:18:24 2008  Masaki Suketa  <masaki.suketa@n...>
+
+	* test/win32ole/test_err_in_callback.rb (teardown): get rid
+	  of infinite loop.
+
 Thu Sep 11 19:12:56 2008  NARUSE, Yui  <naruse@r...>
 
 	* include/ruby/oniguruma.h (OnigCodePoint): unsigned long to unsigned int.
Index: test/win32ole/test_err_in_callback.rb
===================================================================
--- test/win32ole/test_err_in_callback.rb	(revision 19295)
+++ test/win32ole/test_err_in_callback.rb	(revision 19296)
@@ -52,13 +52,16 @@
     end
 
     def ie_quit
+      WIN32OLE_EVENT.message_loop
       sh = WIN32OLE.new('Shell.Application')
       sh.windows.each do |w|
         i = 0
         begin
           i = i + 1
+          next if i > 100
           WIN32OLE_EVENT.message_loop
           sleep 0.1
+          next if /#{@dummy_file}/ !~ w.locationURL
           e = w.document.all.item("str")
           if e && e.innerHTML == @str
             w.quit
@@ -66,7 +69,6 @@
             sleep 0.2
             break
           end
-          next if i > 1000
         rescue
           retry
         end

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

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