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

Modernize respond_to implementations #264

Merged
merged 1 commit into from
Jan 6, 2014
Merged

Modernize respond_to implementations #264

merged 1 commit into from
Jan 6, 2014

Conversation

derekprior
Copy link
Contributor

Since at least Ruby 1.8.7, respond_to? has supported an optional
second parameter which causes private/protected methods to be included
in the check. This defaults to false.

As of Ruby 2, there's a warning logged if an implementation of
respond_to does not take a second parameter, see:
ruby/ruby@a106b31

This change updated the respond_to implementations to support the second
parameter and squelch this warning.

Since at least Ruby 1.8.7, `respond_to?` has supported an optional
second parameter which causes private/protected methods to be included
in the check. This defaults to false.

As of Ruby 2, there's a warning logged if an implementation of
`respond_to` does not take a second parameter, see:
ruby/ruby@a106b31

This change updated the respond_to implementations to support the second
parameter.
jnunemaker pushed a commit that referenced this pull request Jan 6, 2014
Modernize respond_to implementations
@jnunemaker jnunemaker merged commit b48cc4a into jnunemaker:master Jan 6, 2014
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