respond_to? now doesn't return protected methods. #123

Merged
merged 1 commit into from Mar 19, 2013

Projects

None yet

2 participants

Contributor
voxik commented Mar 12, 2013

This is one of changes introduced in Ruby 2.0. Not sure if it is the best solution, but it works for me.

@voxik voxik respond_to? now doesn't return protected methods.
This is one of changes introduced in Ruby 2.0.
cfa19e2
Collaborator
andi commented Mar 12, 2013

Is your change compatible with ruby 1.8 and 1.9?

Contributor
voxik commented Mar 12, 2013

I did not tested it against older Rubies, but at least according to documentation, the additional parameter should work. I also seen similar changes in Rails 3.2 codebase in preparation for 3.2.13.

@andi andi merged commit 9191bcd into codeplant:master Mar 19, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment