1
0
Fork 0
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:
aycabta 2019-11-08 16:17:53 +09:00
parent 83c563cfa4
commit 6e72b72881
3 changed files with 21 additions and 15 deletions

View file

@ -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]