From: Jim Weirich Date: 2006-05-19T03:22:40+09:00 Subject: Re: Rescue clauses on do/end blocks? Eric Hodel wrote: > Setting up and tearing down an exception handler for every block > invocation is going to be expensive. Couldn't the setup/teardown be done only if a rescue/ensure clause was actually present? It also seems to me that this would mean the the setup/teardown would have to be in the block itself, not in the calling method. Thus making it hard to rescue exceptions from the calling method (as some have suggested). For the record, (A) if it can be done efficiently, I'm for it. (B) I'm not in favor of rescuing exceptions from the parent method. That just seems backwards to me. -- -- Jim Weirich -- Posted via http://www.ruby-forum.com/.