From: Phrogz Date: 2007-01-22T00:15:06+09:00 Subject: Re: Hash pairs at? Phrogz wrote: > Trans wrote: > > Seems like there should be a mehtod for this: > class Hash > def entries( *keys ) > self.class[ *keys.zip( values_at( *keys ) ).flatten ] > end > end Oh, and yes: I'd like a method like this in the core, also. Preferably with a more elegant, faster implementation than the above. I find this quite useful sometimes. A recent example that comes to mind is taking the params hash in Rails and specifying a specific subset of the populated values to pass on to another method.