From: "Booth, Peter" Date: 2002-11-08T23:51:28+09:00 Subject: Beginner Question (Idiomatic way to subset an array I'm wondering if there is a more idiomatic way to do the following? Can Array.collect be used to extract a subset of an array? Peter Can class ProcessInfo < Array def findByRealm(realm) result = ProcessInfo.new each { |process| if process['realm'] == realm result << process end } return result end end