From: Mathieu Bouchard Date: 2001-06-19T02:22:59+09:00 Subject: [ruby-talk:16593] Re: RCR: Enumerable: every() and none() On Tue, 19 Jun 2001, Hugh Sasse Staff Elec Eng wrote: > > def every(&block) > find_all(&block) == to_a() > end > > def none(&block) > reject(&block) == to_a() > end instead: def all? ; each {|x| return false if not yield x }; true ; end def none?; each {|x| return true if yield x }; false; end is this right? (this is a shortcutting version) matju