class ActiveRecord::Migration

def singleton_method_added(sym) #:nodoc:

:nodoc:
it is safe for the call to proceed.
recursively. We use @ignore_new_methods as a guard to indicate whether
Because the method added may do an alias_method, it can be invoked
def singleton_method_added(sym) #:nodoc:
  return if defined?(@ignore_new_methods) && @ignore_new_methods
  begin
    @ignore_new_methods = true
    case sym
      when :up, :down
        klass = (class << self; self; end)
        klass.send(:alias_method_chain, sym, "benchmarks")
    end
  ensure
    @ignore_new_methods = false
  end
end