From: Daniel Schierbeck Date: 2006-05-17T03:17:46+09:00 Subject: Enumerable#collect and #select best practices I need to collect the results of calling a method on each object in an Enumerable that defines that method. Currently, I have this: enum.collect{|obj| obj.a_method rescue nil }.compact though this could also work: enum.select do |obj| obj.respond_to? :a_method end.collect{|obj| obj.a_method } although that's a bit verbose. Is there any best practices I should follow? Daniel