We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 06beead + 302b966 commit 8337645Copy full SHA for 8337645
activesupport/lib/active_support/notifications/instrumenter.rb
@@ -158,16 +158,14 @@ def now_cpu # rubocop:disable Lint/DuplicateMethods
158
end
159
160
161
- begin
162
- GC.stat(:total_allocated_objects)
163
- rescue ArgumentError # Likely on JRuby
+ if GC.stat.key?(:total_allocated_objects)
164
def now_allocations
165
- 0
166
- end
167
- else
168
- def now_allocations # rubocop:disable Lint/DuplicateMethods
169
GC.stat(:total_allocated_objects)
170
+ else # Likely on JRuby, TruffleRuby
+ def now_allocations
+ 0
+ end
171
172
173
0 commit comments