diff --git a/activesupport/lib/active_support/callbacks.rb b/activesupport/lib/active_support/callbacks.rb index af683d37ed233fab48b027fee8f9fb0ddc143121..a9253c186db7775fbfa7b203aeafd8ae561df3db 100644 --- a/activesupport/lib/active_support/callbacks.rb +++ b/activesupport/lib/active_support/callbacks.rb @@ -329,7 +329,7 @@ module ClassMethods # This generated method plays caching role. def __define_callbacks(kind, object) #:nodoc: chain = object.send("_#{kind}_callbacks") - name = "_run_callbacks_#{chain.object_id}" + name = "_run_callbacks_#{chain.object_id.abs}" unless object.respond_to?(name, true) class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1 def #{name}() #{chain.compile} end