From: Just Another Victim of the Ambient Morality Date: 2006-08-10T08:55:12+09:00 Subject: Re: Enumerable#all? and empty arrays "Andre Nathan" wrote in message news:1155141696.24603.43.camel@andre.mz.digirati.com.br... > Hello > > I found this to be somewhat amusing: > >>> a = [] > => [] >>> a.all? > => true >>> a.all? { |i| i == 10 } > => true > > Is there any reasoning for Enumerable#all? to always return true for > empty arrays? It's mathematically consistent. You may be surprised to hear this but mathematicians are generally optimists. Thus, if a condition is "vacuously satisfied," then we generally say the condition is true...