From: matz@... (Yukihiro Matsumoto) Date: 2003-05-26T15:49:27+09:00 Subject: Re: exiting of a block Hi, In message "exiting of a block" on 03/05/26, Emmanuel Touzery writes: |result1 = [1, 2, 3].find { |e| | if e == 2 | return true | else | return false | end |} |(with several if/else one in each other rather than one big condition, for |code readability) | |but I realised that 'return' does not apply to a block, but only to a |function. it's a bit (actually very) un-intuitive for me, but anyway, is |there a nicer solution than doing my current: If you switch to 1.8.0, there's nicer way: result = [1, 2, 3].find { |e| if e == 2 break true else break false end } matz.