Skip to content

Commit

Permalink
Updated is_gzip function to remove the forced encoding. This was caus…
Browse files Browse the repository at this point in the history
…ing frozen string literal errors
  • Loading branch information
threeplanetssoftware committed Dec 16, 2024
1 parent d572c31 commit ad1412a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/AppleNote.rb
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ def get_note_contents
# This function checks if specified +data+ is a GZip object by matching the first two bytes.
def is_gzip(data)
return false if !data.is_a?(String)
return data.force_encoding("US-ASCII").start_with?("\x1F\x8B".force_encoding("US-ASCII"))
return data.start_with?("\x1F\x8B")
end

##
Expand Down

0 comments on commit ad1412a

Please sign in to comment.