aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorBogdan Gusiev <agresso@gmail.com>2012-05-18 09:50:09 +0300
committerBogdan Gusiev <agresso@gmail.com>2012-05-18 09:50:09 +0300
commit911a0859ac065aa8e8834ac985353d659c7c7b65 (patch)
tree3ff5d87f79b8d76f8a343898cd93f8a5e738ef8a /activesupport/lib
parenta6a8957132f86684fd15fbfa2737350b8a07cc5b (diff)
downloadrails-911a0859ac065aa8e8834ac985353d659c7c7b65.tar.gz
rails-911a0859ac065aa8e8834ac985353d659c7c7b65.tar.bz2
rails-911a0859ac065aa8e8834ac985353d659c7c7b65.zip
AS::Callbacks: fix run_callbacks for objects with negative id
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/callbacks.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/callbacks.rb b/activesupport/lib/active_support/callbacks.rb
index af683d37ed..a9253c186d 100644
--- a/activesupport/lib/active_support/callbacks.rb
+++ b/activesupport/lib/active_support/callbacks.rb
@@ -329,7 +329,7 @@ module ActiveSupport
# 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