From: Brian Candler Date: 2009-06-05T21:22:17+09:00 Subject: Re: Question about exiting from a block Keeping it simple: def test puts 'before' yield 2 puts 'after' end test do |i| unless i > 1 puts "a lot of code here" end end There's also throw/catch: test do |i| catch(:done) do throw(:done) if i > 1 puts "a lot of code here" end end -- Posted via http://www.ruby-forum.com/.