Fix more 'Lint/ShadowingOuterLocalVar' warnings reported by ameba

This commit is contained in:
Samantaz Fox
2022-01-20 17:17:22 +01:00
parent 1c91110464
commit 12b818a83c
10 changed files with 22 additions and 18 deletions

View File

@@ -98,7 +98,7 @@ module Invidious::Routes::API::Manifest
height = fmt["height"].as_i
# Resolutions reported by YouTube player (may not accurately reflect source)
height = potential_heights.min_by { |i| (height - i).abs }
height = potential_heights.min_by { |x| (height - x).abs }
next if unique_res && heights.includes? height
heights << height

View File

@@ -425,9 +425,9 @@ module Invidious::Routes::Login
found_valid_captcha = false
error_exception = Exception.new
tokens.each do |token|
tokens.each do |tok|
begin
validate_request(token, answer, env.request, HMAC_KEY, locale)
validate_request(tok, answer, env.request, HMAC_KEY, locale)
found_valid_captcha = true
rescue ex
error_exception = ex