newrelic/rpm — pull request #122 by Holek (2013-07-02 10:57:25+00:00)
Title: Remove ActiveSupport::Concern warnings when including MethodTracer in Rails

In Rails 3.2+, when including NewRelic::Agent::MethodTracer
and any concern based on ActiveSupport::Concern in the same class,
ActiveSupport::Concern is displaying warnings like:

DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in TheClass instead.

For `TheClass` defined as:

class TheClass
include SomeConcern
include ::NewRelic::Agent::MethodTracer

add_method_tracer :some_method
end

given the ancestors of `TheClass`:

[TheClass,
NewRelic::Agent::MethodTracer::InstanceMethods,
NewRelic::Agent::MethodTracer,
Object, Kernel]

there’s no need for a `NewRelic::Agent::MethodTracer::InstanceMethods`
since methods on `NewRelic::Agent::MethodTracer` are already in the chain.

http://engineering.appfolio.com/2013/06/17/ruby-mixins-activesupportconcern/