fix callback suspension for ruby 2

need to check for private methods

Change-Id: I5b51b3da9ab3baa8b619c10b684d96fe685a0c9d
Reviewed-on: https://gerrit.instructure.com/36749
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
This commit is contained in:
Cody Cutrer 2014-06-23 14:00:22 -06:00
parent 55292628a2
commit 51fb498800
1 changed files with 1 additions and 1 deletions

View File

@ -80,7 +80,7 @@ module ActiveSupport::Callbacks
def suspended_callback_ancestor
unless defined?(@suspended_callback_ancestor)
@suspended_callback_ancestor = is_a?(Class) ? superclass : self.class
@suspended_callback_ancestor = nil unless @suspended_callback_ancestor.respond_to?(:suspended_callback?)
@suspended_callback_ancestor = nil unless @suspended_callback_ancestor.respond_to?(:suspended_callback?, true)
end
@suspended_callback_ancestor
end