Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix parameter coerce when Hash or Array expected. #54

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

serargz
Copy link

@serargz serargz commented Jun 15, 2015

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.

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.
@serargz
Copy link
Author

serargz commented Jun 17, 2015

hi @mattt, any plans to merge this PR?

@mattt
Copy link
Owner

mattt commented Mar 20, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants