From: Jamis Buck Date: 2004-04-05T00:50:55+09:00 Subject: Re: Any chance to see Exception#resume in Ruby2 ? Dan Doel wrote: > This probably isn't the safest way to do it, but it works. Note that if your > arguments to #raise are wrong, and it throws an ArgumentError, that > will get wrapped with a #resume method. It's probably safer try and > handle all the possible argument combinations to #raise properly, but > this way is a lot easier for a proof-of-concept. > Beautiful, Dan. And thus is the power of Ruby demonstrated once again. Someone wants "raise" to be resumable, and it is eventually shown to be possible using existing Ruby features. -- Jamis Buck jgb3@email.byu.edu http://www.jamisbuck.org/jamis ruby -h | ruby -e 'a=[];readlines.join.scan(/-(.)\[e|Kk(\S*)|le.l(..)e|#!(\S*)/) {|r| a << r.compact.first };puts "\n>#{a.join(%q/ /)}<\n\n"'