From: Phlip Date: 2009-03-09T12:43:17+09:00 Subject: Re: Where's the best version of Hash#pass and Hash#block? >> Where's the best modern version of those methods? > > From Facets: Thanks - I guessed as much, but isn't there also another Boost-style library for Ruby? (Boost is essentially Facets for C++ - a repository of reference implementations for future Standardization, complete with their implications.) > def slice(*keep_keys) It's okay, but... If I already have an array, I have to splat * it in: my_hash.slice(*array) Why doesn't slice do the flatten trick here? keep_keys = [keep_keys].flatten -- Phlip http://www.zeroplayer.com/