lib/new_relic/agent/stats.rb in newrelic_rpm-8.9.0 vs lib/new_relic/agent/stats.rb in newrelic_rpm-8.10.0

- old
+ new

@@ -1,8 +1,10 @@ # encoding: utf-8 # This file is distributed under New Relic's license terms. # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. +# frozen_string_literal: true + module NewRelic module Agent class Stats SKIP_MARSHALLING = [:@lock] @@ -63,10 +65,10 @@ }.to_json(*_) end def record(value = nil, aux = nil, &blk) if blk - yield self + yield(self) else case value when Numeric aux ||= value self.record_data_point(value, aux)