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:
Sokolov Yura 2012-02-14 15:05:45 +04:00
parent 7f6ee93b0e
commit 1076c88784
1 changed files with 1 additions and 1 deletions

View File

@ -356,7 +356,7 @@ module ActiveSupport
#
def __run_callbacks(kind, object, &blk) #:nodoc:
name = __callback_runner_name(kind)
unless object.respond_to?(name)
unless object.respond_to?(name, true)
str = object.send("_#{kind}_callbacks").compile
class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1
def #{name}() #{str} end