From: Christoph Date: 2002-08-08T19:06:01+09:00 Subject: Re: Coding challenge (on Ruby Garden) [long] "Bill Kelly" wrote in message news:002901c23e70$402b3d30$fa7b1b42@musicbox... > Hi, > > > Hm, maybe you want to benchmark my solution, Chr0002, as well? > > Whoops, I don't seem to have Array#any? and Array#all?. :) New > methods in 1.7 I guess? Yup, they are a generalization of && and || to Enumerables. module Enumerable def all? each {|e| return false unless yield e } return true end def any? each {|e| return true if yield e } return false end end /Christoph