From 73412af59a8327923ed0f7ae91efbb6c4f0c0b80 Mon Sep 17 00:00:00 2001 From: suke Date: Thu, 11 Sep 2008 11:15:43 +0000 Subject: [PATCH] * test/win32ole/test_err_in_callback.rb (teardown): get rid of infinite loop. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ test/win32ole/test_err_in_callback.rb | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 833c90d677..775b276cc3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Sep 11 20:18:24 2008 Masaki Suketa + + * test/win32ole/test_err_in_callback.rb (teardown): get rid + of infinite loop. + Thu Sep 11 19:12:56 2008 NARUSE, Yui * include/ruby/oniguruma.h (OnigCodePoint): unsigned long to unsigned int. diff --git a/test/win32ole/test_err_in_callback.rb b/test/win32ole/test_err_in_callback.rb index 710d3651b9..c223804ce6 100644 --- a/test/win32ole/test_err_in_callback.rb +++ b/test/win32ole/test_err_in_callback.rb @@ -52,13 +52,16 @@ if defined?(WIN32OLE) 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 @@ if defined?(WIN32OLE) sleep 0.2 break end - next if i > 1000 rescue retry end