Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #6373 from bogdan/callbacks_fix

AS::Callbacks: fix run_callbacks for objects with negative id
  • Loading branch information...
commit 88949f8ac1759d07fe8502f863dac20f509163c3 2 parents a6a8957 + 911a085
@josevalim josevalim authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  activesupport/lib/active_support/callbacks.rb
View
2  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
Please sign in to comment.
Something went wrong with that request. Please try again.