Skip to content

Commit

Permalink
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ruby/truffle/truffle/objspace.rb
Original file line number Diff line number Diff line change
@@ -65,7 +65,7 @@ def count_objects_size(hash = {})
total = 0
ObjectSpace.each_object(Class) do |klass|
per_klass = memsize_of_all(klass)
hash[klass.name.to_sym] = per_klass
hash[klass.name.to_sym] = per_klass unless klass.name.nil?

This comment has been minimized.

Copy link
@eregon

eregon Sep 15, 2015

Member

or if klass.name.
nil? seems not so idiomatic (but totally fine here).

total += per_klass
end
hash[:TOTAL] = total

0 comments on commit 407033b

Please sign in to comment.