From: Chad Fowler Date: 2004-03-13T05:28:40+09:00 Subject: Re: Win32OLE bug On Sat, 13 Mar 2004, Bret Pettichord wrote: # > # >form = callcc do |cc| #1 # > ie.document.forms.each do |form| #2 # > if(form.action == "start") #3 # > cc.call(form) #4 # > end #5 # > end #6 # >end #7 # > # >puts form.inspect # >"# # > # >Chad # # Thanks Chad. I actually included my workaround in my original post (but # which kent snipped). I don't understand what you have here. Line one of my example assigns the result of the #callcc invocation to the "form" variable. callcc stands for "call with current continuation". The continuation (to simplify) is a complete snapshot of state at a current point in time (including the position of execution). Executing the #call method on the continuation returns to the point directly after the #callcc invocation, unwinding the call stack, and any arguments passed into #call (such as "form" in line 4) are the return values from the #callcc invocation itself. Jim Weirch has a much more lucid explanation here: http://onestepback.org/index.cgi/Tech/Programming/Kata/KataTwoCallCC.rdoc Alternatively, for this example, you could use throw and catch. Chad