From: matz@... (Yukihiro Matsumoto) Date: 2000-11-07T13:19:50+09:00 Subject: [ruby-talk:6099] Re: detect:ifNone: in Ruby In message "[ruby-talk:6096] Re: detect:ifNone: in Ruby" on 00/11/07, Dave Thomas writes: |I guess that if the block form isn't important we _could_ just use |'or'... | | x = (a.detect {|i| i == 2} or 99) | |(btw. This is an interesting case where the precedence rules just |can't win... ;-) Try x = a.detect {|i| i == 2} || 99 but I admit it's more cryptic (closer to Perl ;-) matz.