From: Matthias Reitinger Date: 2009-03-09T16:51:35+09:00 Subject: Re: Where's the best version of Hash#pass and Hash#block? Phlip wrote: > Where's the best modern version of those methods? Here's my shot at it: class Hash def pass(*keys) Hash[select {|k,v| keys.include? k}] end def block(*keys) reject {|k,v| keys.include? k} end end -Matthias -- Posted via http://www.ruby-forum.com/.