Permalink
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...
1 parent 7f6ee93 commit 1076c887843f88cf5ec5757afe9428dde2f7e959 @funny-falcon funny-falcon committed Feb 14, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 activesupport/lib/active_support/callbacks.rb
View
2 activesupport/lib/active_support/callbacks.rb
@@ -356,7 +356,7 @@ module ClassMethods
#
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

0 comments on commit 1076c88

Please sign in to comment.