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

method_missing on params object ignores arguments #112

Closed
timbertson opened this issue Mar 7, 2016 · 1 comment
Closed

method_missing on params object ignores arguments #112

timbertson opened this issue Mar 7, 2016 · 1 comment

Comments

@timbertson
Copy link

When a task receives a params object whose inspect prints {:subdomain=>"support”}, calling params.fetch(:support) surprisingly returns nil. Clearly this is not a hash.

It looks like this is implemented via a method_missing which performs lookup. This implementation should throw if any arguments are passed, because if you're providing arguments you clearly didn't expect this to be a simple getter method.

@hsbt
Copy link
Member

hsbt commented Nov 1, 2016

#171 fixed your confusion maybe.

@hsbt hsbt closed this as completed Nov 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants