Srinivas Jonnalagadda schrieb:
> Enumerable#select always returns an array. On a hash too, it returns
> an array of arrays of key-value pairs.

Right.

> The issue with this approach is that 'select' calls cannot be chained.
> It is now mandatory to know whether the receiver is the original hash
> or is the result of at least one 'select'.

It works for me:

   h = { 0 => 0, 1 => 2, 2 => 3, 4 => 4 }

   h.select { |k,v| k % 2 == 0 }.select { |k,v| v % 2 == 0 }

   # => [[0, 0], [4, 4]]

Can you show us your problem?

Regards,
Pit