ruby-changes:56283
From: Nobuyoshi <ko1@a...>
Date: Sun, 30 Jun 2019 18:28:59 +0900 (JST)
Subject: [ruby-changes:56283] Nobuyoshi Nakada: 41012f2e2b (trunk): Add parentheses to suppress warnings
https://git.ruby-lang.org/ruby.git/commit/?id=41012f2e2b From 41012f2e2b71fddc9acf8a50d887707c44ad8f88 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Sun, 30 Jun 2019 09:30:21 +0900 Subject: Add parentheses to suppress warnings diff --git a/test/lib/profile_test_all.rb b/test/lib/profile_test_all.rb index 4771b72..2c360d7 100644 --- a/test/lib/profile_test_all.rb +++ b/test/lib/profile_test_all.rb @@ -43,7 +43,7 @@ class MiniTest::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/lib/profile_test_all.rb#L43 result << ObjectSpace.memsize_of_all end - add *GC.stat.keys do |result, *| + add(*GC.stat.keys) do |result, *| GC.stat(TEST_ALL_PROFILE_GC_STAT_HASH) result.concat TEST_ALL_PROFILE_GC_STAT_HASH.values end @@ -52,7 +52,7 @@ class MiniTest::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/lib/profile_test_all.rb#L52 return unless FileTest.exist?(file) regexp = /(#{fields.join("|")}):\s*(\d+) kB/ # check = {}; fields.each{|e| check[e] = true} - add *fields do |result, *| + add(*fields) do |result, *| text = File.read(file) text.scan(regexp){ # check.delete $1 @@ -67,7 +67,7 @@ class MiniTest::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/lib/profile_test_all.rb#L67 add_proc_meminfo '/proc/self/status', %w(VmPeak VmSize VmHWM VmRSS) if FileTest.exist?('/proc/self/statm') - add *%w(size resident share text lib data dt) do |result, *| + add 'size', 'resident', 'share', 'text', 'lib', 'data', 'dt' do |result, *| result.concat File.read('/proc/self/statm').split(/\s+/) end end -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/