diff --git a/transcode.c b/transcode.c index 2c0b30ca0e..84c579eb2e 100644 --- a/transcode.c +++ b/transcode.c @@ -3150,8 +3150,12 @@ econv_s_search_convpath(int argc, VALUE *argv, VALUE klass) convpath = Qnil; transcode_search_path(sname, dname, search_convpath_i, &convpath); - if (NIL_P(convpath)) - rb_exc_raise(rb_econv_open_exc(sname, dname, ecflags)); + if (NIL_P(convpath)) { + VALUE exc = rb_econv_open_exc(sname, dname, ecflags); + RB_GC_GUARD(snamev); + RB_GC_GUARD(dnamev); + rb_exc_raise(exc); + } if (decorate_convpath(convpath, ecflags) == -1) { VALUE exc = rb_econv_open_exc(sname, dname, ecflags); diff --git a/version.h b/version.h index 7c1ad2c842..25eef3bdbd 100644 --- a/version.h +++ b/version.h @@ -1,6 +1,6 @@ #define RUBY_VERSION "2.5.4" #define RUBY_RELEASE_DATE "2019-01-20" -#define RUBY_PATCHLEVEL 136 +#define RUBY_PATCHLEVEL 137 #define RUBY_RELEASE_YEAR 2019 #define RUBY_RELEASE_MONTH 1