Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

sync __run_callbacks with ruby-trunk #5039

Merged
merged 1 commit into from

3 participants

@funny-falcon

https://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/34580
In this revision behavior of respond_to? had changed: now to ask about
protected method one should pass second argument true

@funny-falcon funny-falcon sync __run_callbacks with ruby-trunk
https://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/34580
In this revision behavior of respond_to? had changed: now to ask about
protected method one should pass second argument `true`
1076c88
@josevalim josevalim merged commit fa04a73 into rails:master
@tenderlove
Owner

I think this should be backported to 3-2-stable too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 14, 2012
  1. @funny-falcon

    sync __run_callbacks with ruby-trunk

    funny-falcon authored
    https://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/34580
    In this revision behavior of respond_to? had changed: now to ask about
    protected method one should pass second argument `true`
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  activesupport/lib/active_support/callbacks.rb
View
2  activesupport/lib/active_support/callbacks.rb
@@ -356,7 +356,7 @@ module ClassMethods
#
def __run_callbacks(kind, object, &blk) #:nodoc:
name = __callback_runner_name(kind)
- unless object.respond_to?(name)
+ unless object.respond_to?(name, true)
str = object.send("_#{kind}_callbacks").compile
class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1
def #{name}() #{str} end
Something went wrong with that request. Please try again.