Fix coercion of enumerable types

Coercion of enumerations (Arrays, Hashes and Sets) was not working. I made changes keeping the fallbacks. Please take a look.

Best regards.