Hi,
In message "[ruby-talk:16622] Re: RCR: Enumerable: every() and none()"
on 01/06/20, Mike <mike / lepton.fr> writes:
|> In 1.7, we have "Enumerable#all?" and "Enumerable#any?".
|>
|> [1,2,3].all?{|x| > 0} # true
|> [1,2,3].any?{|x| == 2} # true
|
|Should it be {|x| x > 0} and {|x| x == 2} or is this syntax allowed in
|1.7?
Oops, of course {|x| x > 0} and {|x| x == 2}.
matz.