Skip to content

Commit ad1412a

Browse files
Updated is_gzip function to remove the forced encoding. This was causing frozen string literal errors
1 parent d572c31 commit ad1412a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/AppleNote.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ def get_note_contents
312312
# This function checks if specified +data+ is a GZip object by matching the first two bytes.
313313
def is_gzip(data)
314314
return false if !data.is_a?(String)
315-
return data.force_encoding("US-ASCII").start_with?("\x1F\x8B".force_encoding("US-ASCII"))
315+
return data.start_with?("\x1F\x8B")
316316
end
317317

318318
##

0 commit comments

Comments
 (0)