From a2fc20db8f5b15f54dd656f11f2f5c6f2bc1514b Mon Sep 17 00:00:00 2001 From: OZAWA Sakuro <10973+sakuro@users.noreply.github.com> Date: Mon, 16 Jan 2023 11:19:03 +0900 Subject: [PATCH] Zip::InputStream#read returns '' with 0 --- lib/zip/ioextras/abstract_input_stream.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/zip/ioextras/abstract_input_stream.rb b/lib/zip/ioextras/abstract_input_stream.rb index 721e33a..c132725 100644 --- a/lib/zip/ioextras/abstract_input_stream.rb +++ b/lib/zip/ioextras/abstract_input_stream.rb @@ -36,7 +36,7 @@ module Zip end if tbuf.nil? || tbuf.empty? - return nil if number_of_bytes + return nil if number_of_bytes&.positive? return '' end