From: "shemerey (Anton Shemerey)" Date: 2012-07-21T01:54:06+09:00 Subject: [ruby-core:46572] [ruby-trunk - Bug #6760] unexpected behavior in Enumerable method all? if collection is empty Issue #6760 has been updated by shemerey (Anton Shemerey). thx for your explanation now it's clear. I think this bug can be closed bunch of thanks, i don't thought about this problem from "Vacuous truth" side %-) ---------------------------------------- Bug #6760: unexpected behavior in Enumerable method all? if collection is empty https://bugs.ruby-lang.org/issues/6760#change-28234 Author: shemerey (Anton Shemerey) Status: Rejected Priority: Normal Assignee: Category: core Target version: 1.9.3 ruby -v: ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-darwin11.3.0] if collection is empty all? always return true even if we call it with undefined method for example -> [].all?(&:undefined_mathod) #=> true -> {}.all?(&:undefined_mathod) #=> true etc. my fix for it un ruby: module Enumerable alias_method :_original_method_all?, :all? def all?(&block) return false if count == 0 if block_given? _original_method_all?(&block) else _original_method_all? end end end example test file in attach -- http://bugs.ruby-lang.org/