From ecedebab2c559386c86f98be364c0e6941c2a405 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 18 May 2018 00:40:06 +0000 Subject: tool: fixed shadowing variables git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- tool/checksum.rb | 2 +- tool/rbinstall.rb | 2 +- tool/transcode-tblgen.rb | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'tool') diff --git a/tool/checksum.rb b/tool/checksum.rb index 0de54a314d..3b41aedcfc 100755 --- a/tool/checksum.rb +++ b/tool/checksum.rb @@ -67,6 +67,6 @@ class Checksum def self.update(argv) k = new(VPath.new) k.source, k.target, *argv = k.def_options.parse(*argv) - k.update {|k| yield(k, *argv)} + k.update {|_| yield(_, *argv)} end end diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb index 9e935bdb47..5a55b39add 100755 --- a/tool/rbinstall.rb +++ b/tool/rbinstall.rb @@ -590,7 +590,7 @@ install?(:local, :comm, :man) do STDIN.reopen(f) begin destfile << suffix - IO.popen(compress) {|f| f.read} + IO.popen(compress, &:read) ensure STDIN.reopen(stdin) stdin.close diff --git a/tool/transcode-tblgen.rb b/tool/transcode-tblgen.rb index 5134a49b43..156b2de197 100644 --- a/tool/transcode-tblgen.rb +++ b/tool/transcode-tblgen.rb @@ -145,7 +145,7 @@ class ActionMap else b = $1.to_i(16) e = $2.to_i(16) - b.upto(e) {|c| set[c] = true } + b.upto(e) {|_| set[_] = true } end } i = nil @@ -297,10 +297,10 @@ class ActionMap raise ArgumentError, "ambiguous pattern: #{prefix}" if min.length != prefix.length h[action] = true end - region_rects.each {|min, max, action| + for min, _, action in region_rects raise ArgumentError, "ambiguous pattern: #{prefix}" if !min.empty? h[action] = true - } + end tree = Action.new(block.call(prefix, h.keys)) h.clear else -- cgit v1.2.1