ruby-changes:64521
From: aycabta <ko1@a...>
Date: Wed, 23 Dec 2020 21:30:01 +0900 (JST)
Subject: [ruby-changes:64521] 31bd172185 (master): [ruby/irb] Suppress "shadowing outer" warning
https://git.ruby-lang.org/ruby.git/commit/?id=31bd172185 From 31bd17218515a20cf46951018d413b739935beba Mon Sep 17 00:00:00 2001 From: aycabta <aycabta@g...> Date: Wed, 23 Dec 2020 21:18:48 +0900 Subject: [ruby/irb] Suppress "shadowing outer" warning https://github.com/ruby/irb/commit/8b83fbef69 diff --git a/lib/irb/ruby-lex.rb b/lib/irb/ruby-lex.rb index b070278..9914aec 100644 --- a/lib/irb/ruby-lex.rb +++ b/lib/irb/ruby-lex.rb @@ -557,7 +557,7 @@ class RubyLex https://github.com/ruby/ruby/blob/trunk/lib/irb/ruby-lex.rb#L557 end_type << :on_regexp_end when :on_symbeg acceptable_single_tokens = %i{on_ident on_const on_op on_cvar on_ivar on_gvar on_kw} - if (i + 1) < tokens.size and acceptable_single_tokens.all?{ |t| tokens[i + 1][1] != t } + if (i + 1) < tokens.size and acceptable_single_tokens.all?{ |st| tokens[i + 1][1] != st } start_token << t end_type << :on_tstring_end end -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/