summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNAKAMURA Usaku <usa@ruby-lang.org>2021-12-31 19:48:36 +0900
committerNAKAMURA Usaku <usa@ruby-lang.org>2021-12-31 19:48:36 +0900
commit1034b6e7ba9442320e16c260d634d4c64d5e62bf (patch)
treecf3802489d490120a95f8199c23f29fe936afcd5
parent1cc5567b46249e6b4bd2dd3cfdd348ab885f59e3 (diff)
merge revision(s) 0c5f8c62766afe4605172800063e63fe36996658: [Backport #10961]ruby_2_7
[ruby/zlib] Resume zstream if available [Bug #10961] --- ext/zlib/zlib.c | 6 ++++++ 1 file changed, 6 insertions(+)
-rw-r--r--ext/zlib/zlib.c6
-rw-r--r--version.h2
2 files changed, 7 insertions, 1 deletions
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index 5c8aab24af6..3b8e097da9b 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -1066,6 +1066,12 @@ loop:
RB_NOGVL_UBF_ASYNC_SAFE);
#endif
+ /* retry if no exception is thrown */
+ if (err == Z_OK && args.interrupt) {
+ args.interrupt = 0;
+ goto loop;
+ }
+
if (flush != Z_FINISH && err == Z_BUF_ERROR
&& z->stream.avail_out > 0) {
z->flags |= ZSTREAM_FLAG_IN_STREAM;
diff --git a/version.h b/version.h
index dc3d5271075..960bec511d2 100644
--- a/version.h
+++ b/version.h
@@ -2,7 +2,7 @@
# define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR
#define RUBY_VERSION_TEENY 6
#define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR
-#define RUBY_PATCHLEVEL 208
+#define RUBY_PATCHLEVEL 209
#define RUBY_RELEASE_YEAR 2021
#define RUBY_RELEASE_MONTH 12