# File lib/facets/core/enumerable/collect_if.rb, line 4 def collect_if(&b) a = map(&b) # to get the same semantics as select{|e| e} a.delete(false) a.compact! a end