mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2025-12-21 02:18:52 +00:00
Fix more 'Lint/ShadowingOuterLocalVar' warnings reported by ameba
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user