lib/new_relic/agent/instrumentation/fiber/chain.rb in newrelic_rpm-9.2.2 vs lib/new_relic/agent/instrumentation/fiber/chain.rb in newrelic_rpm-9.3.0
- old
+ new
@@ -8,12 +8,19 @@
::Fiber.class_eval do
include NewRelic::Agent::Instrumentation::MonitoredFiber
alias_method(:initialize_without_new_relic, :initialize)
- def initialize(*args, &block)
- traced_block = add_thread_tracing(*args, &block)
- initialize_with_newrelic_tracing { initialize_without_new_relic(*args, &traced_block) }
+ if RUBY_VERSION < '2.7.0'
+ def initialize(*_args, &block)
+ traced_block = add_thread_tracing(&block)
+ initialize_with_newrelic_tracing { initialize_without_new_relic(&traced_block) }
+ end
+ else
+ def initialize(**kwargs, &block)
+ traced_block = add_thread_tracing(&block)
+ initialize_with_newrelic_tracing { initialize_without_new_relic(**kwargs, &traced_block) }
+ end
end
end
end
end
end