lib/active_support/callbacks.rb in activesupport-3.2.1 vs lib/active_support/callbacks.rb in activesupport-3.2.2.rc1
- old
+ new
@@ -393,10 +393,10 @@
# If this called first time it creates a new callback method for the key,
# calculating which callbacks can be omitted because of per_key conditions.
#
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
protected :#{name}
RUBY_EVAL