Check for key explicitly with key?

Co-authored-by: Rylan Polster <rslpolster@gmail.com>
This commit is contained in:
Connor Mann 2021-05-14 15:16:37 -04:00 committed by GitHub
parent b546960da9
commit 2a9540b3ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -138,7 +138,7 @@ module Utils
# Any value for `accept-ranges` other than none indicates that the server supports partial requests. # Any value for `accept-ranges` other than none indicates that the server supports partial requests.
# Its absence indicates no support. # Its absence indicates no support.
supports_partial = headers["accept-ranges"] && headers["accept-ranges"] != "none" supports_partial = headers.key? "accept-ranges" && headers["accept-ranges"] != "none"
if supports_partial && if supports_partial &&
destination.exist? && destination.exist? &&