diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-06-30 09:30:21 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-06-30 11:41:10 +0900 |
commit | 41012f2e2b71fddc9acf8a50d887707c44ad8f88 (patch) | |
tree | 08c7de279b3f11ce1e6e6da731721050060f319c /test/lib | |
parent | 78a8888c3eb6377218e8d3ec94a162c2c20eef82 (diff) | |
download | ruby-41012f2e2b71fddc9acf8a50d887707c44ad8f88.tar.gz |
Add parentheses to suppress warnings
Diffstat (limited to 'test/lib')
-rw-r--r-- | test/lib/profile_test_all.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/lib/profile_test_all.rb b/test/lib/profile_test_all.rb index 4771b72afb..2c360d76dd 100644 --- a/test/lib/profile_test_all.rb +++ b/test/lib/profile_test_all.rb @@ -43,7 +43,7 @@ class MiniTest::Unit::TestCase 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 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 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 |