ruby-changes:64466
From: aycabta <ko1@a...>
Date: Tue, 22 Dec 2020 23:51:23 +0900 (JST)
Subject: [ruby-changes:64466] 0b14abe8e7 (master): [ruby/irb] Suppress "shadowing outer" warning
https://git.ruby-lang.org/ruby.git/commit/?id=0b14abe8e7 From 0b14abe8e7610e81e6bac7a4696cdcc24ca164c0 Mon Sep 17 00:00:00 2001 From: aycabta <aycabta@g...> Date: Tue, 22 Dec 2020 05:08:12 +0900 Subject: [ruby/irb] Suppress "shadowing outer" warning https://github.com/ruby/irb/commit/27b149c599 diff --git a/lib/irb/cmd/measure.rb b/lib/irb/cmd/measure.rb index 244879c..0806f84 100644 --- a/lib/irb/cmd/measure.rb +++ b/lib/irb/cmd/measure.rb @@ -14,8 +14,8 @@ module IRB https://github.com/ruby/ruby/blob/trunk/lib/irb/cmd/measure.rb#L14 IRB.conf[:MEASURE] = nil IRB.unset_measure_callback(arg) when :list - IRB.conf[:MEASURE_CALLBACKS].each do |type_name, _, arg| - puts "- #{type_name}" + (arg ? "(#{arg.inspect})" : '') + IRB.conf[:MEASURE_CALLBACKS].each do |type_name, _, arg_val| + puts "- #{type_name}" + (arg_val ? "(#{arg_val.inspect})" : '') end when :on IRB.conf[:MEASURE] = true -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/