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