We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ec8d9bd commit e3c9f85Copy full SHA for e3c9f85
lib/AppleNote.rb
@@ -312,7 +312,7 @@ def get_note_contents
312
# This function checks if specified +data+ is a GZip object by matching the first two bytes.
313
def is_gzip(data)
314
return false if !data.is_a?(String)
315
- return data.start_with?("\x1F\x8B")
+ return (data.length > 2 and data.bytes[0] == 0x1f and data.bytes[1] == 0x8B)
316
end
317
318
##
0 commit comments