Fix parameter coerce when Hash or Array expected.
When Array is expected and for some reason a Hash is received, an unhandled exception was raised. The same thing happens when Hash is expected an Array is received. This commit converts the Hash to Array with Array#to_a for the first case, and converts the Array to string for the former.
hi @mattt, any plans to merge this PR?
Apologies for the delay in responding, @serargz. Thank you for your contribution.
I think there's a lot of room for improvement in the current implementation. The clever Ruby idioms I used in the initial implementation aren't looking too great now with all of this additional functionality. I'm investigating a refactoring for all this in the next major release, and will look into how best to incorporate your changes.