https://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?17097754782012-07-21T01:23:22ZRuby Issue Tracking SystemRuby master - Bug #6760: unexpected behavior in Enumerable method all? if collection is emptyhttps://bugs.ruby-lang.org/issues/6760?journal_id=282322012-07-21T01:23:22Zmarcandre (Marc-Andre Lafortune)marcandre-ruby-core@marc-andre.ca
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Rejected</i></li></ul><p>This is not a bug. This behavior is clear from the documentation, both in the form with and without a block:</p>
<p>"The method returns true if the block never returns false or nil."</p>
<p>"If the block is not given [...] will return true only if none of the collection members are false or nil."</p>
<p>You may open a feature request if you want, but I feel it won't be accepted, because the current behavior makes sense (see <a href="http://en.wikipedia.org/wiki/Vacuous_truth" class="external">http://en.wikipedia.org/wiki/Vacuous_truth</a> ). It would be an incompatible change and would need very good justification.</p> Ruby master - Bug #6760: unexpected behavior in Enumerable method all? if collection is emptyhttps://bugs.ruby-lang.org/issues/6760?journal_id=282342012-07-21T01:54:05Zshemerey (Anton Shemerey)shemerey@gmail.com
<ul></ul><p>thx for your explanation now it's clear.<br>
I think this bug can be closed</p>
<p>bunch of thanks, i don't thought about this problem from "Vacuous truth" side %-)</p>