From: John Sikora Date: 2010-07-31T03:25:36+09:00 Subject: Re: .any?{} Behavior Joel VanderWerf wrote: > pattern = /.../ > tests = [ Test.new(...), ..., Test.new(...) ] > runnable_tests = tests.select {|test| pattern === test.name} > > if runnable_tests.all?{|test|test.pass} > puts "Ok!" > else > puts "Failed!" > end > __END__ > > How do we want this program to work if no tests match the pattern? Is it > a failure case? IMO, it is not. > > I don't want to code a special case for runnable_tests.empty? > > This seems very English-like to me, but YMMV of course. Yes, I can see where you would want your result to be according to convention and opposite of what I stated. js -- Posted via http://www.ruby-forum.com/.