1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* benchmark/driver.rb: fix output messages.

* benchmark/memory_wrapper.rb: use respond_to? because
  member? does not work well.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ko1 2016-03-09 07:42:32 +00:00
parent a5ca1179f3
commit a036c02650
3 changed files with 12 additions and 5 deletions

View file

@ -7,9 +7,9 @@ open(write_file, 'wb'){|f|
ms = Memory::Status.new
case target.to_sym
when :peak
key = ms.member?(:hwm) ? :hwm : :peak
key = ms.respond_to?(:hwm) ? :hwm : :peak
when :size
key = ms.member?(:rss) ? :rss : :size
key = ms.respond_to?(:rss) ? :rss : :size
end
f.puts ms[key]