rails/rails — Issue #5037: Ruby-trunk changes respond_to? behaviour
Author: funny-falcon
Created: 2012-02-14 10:50:43+00:00
State: open

https://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/34580

In this revision `respond_to?` stop to report for protected method when called without second parameter set to `true`

So that, `ActiveSupport::Callbacks::ClassMethods#__run_callback` is unable to detect already defined method.

````
def __run_callback(key, kind, object, &blk) #:nodoc:
name = __callback_runner_name(key, find)
- unless object.respond_to?(name)
+ unless object.respond_to?(name, true)
str = send("_#{kind}_callbacks").compile(key, object)
class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1
````

(sorry for not pull request. I've broke github in some strange way)