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

Respond to missing #6169

Merged
merged 3 commits into from May 5, 2012
Merged

Respond to missing #6169

merged 3 commits into from May 5, 2012

Conversation

marcandre
Copy link
Contributor

In Ruby 1.9.2, it's better to use respond_to_missing? than respond_to?, as it also handles method creation.

I see there are others in other rails packages, I'll create additional pull requests when I get a chance.

Thanks

josevalim added a commit that referenced this pull request May 5, 2012
@josevalim josevalim merged commit d6e2c81 into rails:master May 5, 2012
@josevalim
Copy link
Contributor

Yes, please do!

@jonleighton
Copy link
Member

"as it also handles method creation" - what does this mean? Educate me, I am ignorant! Thanks

@marcandre
Copy link
Contributor Author

@jonleighton : as per the modified tests, obj.method(:via_missing) works. See also http://blog.marc-andre.ca/2010/11/methodmissing-politely.html

@jonleighton
Copy link
Member

Aha, thanks!

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.

None yet

4 participants