mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Suppress "shadowing outer local variable" warning in 2.5
This commit is contained in:
parent
83c563cfa4
commit
6e72b72881
3 changed files with 21 additions and 15 deletions
|
@ -32,7 +32,7 @@ class Reline::KeyStroke
|
|||
end
|
||||
|
||||
def expand(input)
|
||||
lhs = key_mapping.keys.select { |lhs| input.start_with? lhs }.sort_by(&:size).reverse.first
|
||||
lhs = key_mapping.keys.select { |item| input.start_with? item }.sort_by(&:size).reverse.first
|
||||
return input unless lhs
|
||||
rhs = key_mapping[lhs]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue