Fix warnings in latest version of Crystal

This commit is contained in:
Omar Roth
2020-04-09 12:18:09 -05:00
parent be655ee328
commit ca1185d0be
11 changed files with 119 additions and 79 deletions

View File

@@ -43,15 +43,10 @@ def sign_token(key, hash)
string_to_sign = [] of String
hash.each do |key, value|
if key == "signature"
next
end
next if key == "signature"
if value.is_a?(JSON::Any)
case value
when .as_a?
value = value.as_a.map { |item| item.as_s }
end
if value.is_a?(JSON::Any) && value.as_a?
value = value.as_a.map { |i| i.as_s }
end
case value