From: Joel VanderWerf Date: 2005-08-11T14:58:30+09:00 Subject: Re: Bindings at the time of Exceptions Joel VanderWerf wrote: > No trickery, but you do have to have the cooperation of the code which > raises: And just for fun, because it's late here... def foo a = "value of a" cc = nil callcc{|cc|} if a raise StandardError, binding else return "normally" end end def bar foo rescue => e return e.message end b = bar case b when Binding eval("a=nil", b) eval("cc", b).call else puts "Exiting #{b}" end -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407