Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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`
  • Loading branch information...
commit 0c0f278ab20f3042cdb69604166e18a61f8605ad 1 parent 41c182c
@funny-falcon funny-falcon authored tenderlove committed
Showing with 1 addition and 1 deletion.
  1. +1 −1  activesupport/lib/active_support/callbacks.rb
View
2  activesupport/lib/active_support/callbacks.rb
@@ -395,7 +395,7 @@ def #{runner_method}(key = nil, &blk)
#
def __run_callback(key, kind, object, &blk) #:nodoc:
name = __callback_runner_name(key, kind)
- unless object.respond_to?(name)
+ unless object.respond_to?(name, true)
str = object.send("_#{kind}_callbacks").compile(key, object)
class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1
def #{name}() #{str} end
Please sign in to comment.
Something went wrong with that request. Please try again.