From: Bret Pettichord Date: 2004-03-12T09:19:39+09:00 Subject: Win32OLE bug I'm seeing the following in 1.8.0 (mswin32) using win32ole: In this case, i am working with Internet Explorer. $iec.document is the WIN32OLE wrapper around the document object (ie. the DOM). Also, one of the forms in this DOM has an action == "start". irb(main):009:0> for form in $iec.document.forms irb(main):010:1> if form.action == "start" irb(main):011:2> return form irb(main):012:2> end irb(main):013:1> end LocalJumpError: unexpected return from (irb):11 from (irb):9:in `each' from (irb):9 Note: this behavior is better than in 1.6.8. In that case, the function appeared to work correctly, but then ruby would hang on exit. That was a bear to isolate! I'm not sure if this is a known problem, or how to go about reporting it. Any suggestions? (P.S. I do know how to workaround this bug: def get_form_by_action(action) "Return the first Form on the current page that has the specified Action." retval = nil # this ugliness avoids scripts hanging on exit (1.6) or a LocalJumpError (1.8) for form in @iec.document.forms next if retval if form.action == action retval = IEDomFormWrapper.new(form) end end return retval end ) Bret _____________________________________ Bret Pettichord, Software Tester Book - www.testinglessons.com Consulting - www.pettichord.com Blog - www.io.com/~wazmo/blog Homebrew Automation Seminar March 19, Redmond, Washington www.sasqag.org/99days/#automation