0
0
Fork 0

Fix Style/ClassEqualityComparison cop (#30058)

This commit is contained in:
Matt Jankowski 2024-06-21 11:33:55 -04:00 committed by GitHub
parent 72484a194f
commit 348ccf206e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 2 additions and 10 deletions

View file

@ -141,7 +141,7 @@ module JsonLdHelper
def safe_for_forwarding?(original, compacted)
original.without('@context', 'signature').all? do |key, value|
compacted_value = compacted[key]
return false unless value.class == compacted_value.class
return false unless value.instance_of?(compacted_value.class)
if value.is_a?(Hash)
safe_for_forwarding?(value, compacted_value)