summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--io.c1
-rw-r--r--version.h2
2 files changed, 2 insertions, 1 deletions
diff --git a/io.c b/io.c
index 4440418d96..be5c0d2b27 100644
--- a/io.c
+++ b/io.c
@@ -2712,6 +2712,7 @@ io_write_nonblock(VALUE io, VALUE str, VALUE ex)
rb_io_set_nonblock(fptr);
n = write(fptr->fd, RSTRING_PTR(str), RSTRING_LEN(str));
+ RB_GC_GUARD(str);
if (n == -1) {
int e = errno;
diff --git a/version.h b/version.h
index 57e7d2a0aa..51e111fe73 100644
--- a/version.h
+++ b/version.h
@@ -1,6 +1,6 @@
#define RUBY_VERSION "2.4.6"
#define RUBY_RELEASE_DATE "2019-01-31"
-#define RUBY_PATCHLEVEL 340
+#define RUBY_PATCHLEVEL 341
#define RUBY_RELEASE_YEAR 2019
#define RUBY_RELEASE_MONTH 1