From: Dave Thomas Date: 2000-11-07T13:05:32+09:00 Subject: [ruby-talk:6096] Re: detect:ifNone: in Ruby matz@zetabits.com (Yukihiro Matsumoto) writes: > I don't vote for `ifNil' with or without `?'. With `?' it too looks > like `nil?'. Without `?', the name convention is Smalltalkish, not > Ruby way. If we can find better name, I agree to add the method to > the next version. 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... ;-) Dave