is this consistent with other peoples stdlib hacks?

class Hash
   def slice *keys, &block
     if block
       each do |key, val|
         boolean = block.call(key, val)
         keys << key if boolean
       end
     end
     hash = self
     keys.inject({}){|returned, key| returned.update key => hash[key]}
   end
end


??


a @ http://codeforpeople.com/
--
we can deny everything, except that we have the possibility of being  
better. simply reflect on that.
h.h. the 14th dalai lama