aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2012-05-17 23:56:32 -0700
committerJosé Valim <jose.valim@gmail.com>2012-05-17 23:56:32 -0700
commit88949f8ac1759d07fe8502f863dac20f509163c3 (patch)
tree3ff5d87f79b8d76f8a343898cd93f8a5e738ef8a /activesupport
parenta6a8957132f86684fd15fbfa2737350b8a07cc5b (diff)
parent911a0859ac065aa8e8834ac985353d659c7c7b65 (diff)
downloadrails-88949f8ac1759d07fe8502f863dac20f509163c3.tar.gz
rails-88949f8ac1759d07fe8502f863dac20f509163c3.tar.bz2
rails-88949f8ac1759d07fe8502f863dac20f509163c3.zip
Merge pull request #6373 from bogdan/callbacks_fix
AS::Callbacks: fix run_callbacks for objects with negative id
Diffstat (limited to 'activesupport')
-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