mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
sync __run_callbacks with ruby-trunk
https://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/34580 In this revision behavior of respond_to? had changed: now to ask about protected method one should pass second argument `true`
This commit is contained in:
parent
7f6ee93b0e
commit
1076c88784
1 changed files with 1 additions and 1 deletions
|
@ -356,7 +356,7 @@ module ActiveSupport
|
||||||
#
|
#
|
||||||
def __run_callbacks(kind, object, &blk) #:nodoc:
|
def __run_callbacks(kind, object, &blk) #:nodoc:
|
||||||
name = __callback_runner_name(kind)
|
name = __callback_runner_name(kind)
|
||||||
unless object.respond_to?(name)
|
unless object.respond_to?(name, true)
|
||||||
str = object.send("_#{kind}_callbacks").compile
|
str = object.send("_#{kind}_callbacks").compile
|
||||||
class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1
|
class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1
|
||||||
def #{name}() #{str} end
|
def #{name}() #{str} end
|
||||||
|
|
Loading…
Reference in a new issue