ruby-changes:56804
From: Nobuyoshi <ko1@a...>
Date: Sun, 4 Aug 2019 22:27:20 +0900 (JST)
Subject: [ruby-changes:56804] Nobuyoshi Nakada: 76e2370f13 (master): Fix dangling path name from fstring
https://git.ruby-lang.org/ruby.git/commit/?id=76e2370f13 From 76e2370f132f83c16c9de39a0a9356579f364527 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Sun, 4 Aug 2019 22:19:18 +0900 Subject: Fix dangling path name from fstring * load.c (rb_require_internal): make sure in advance that the path to be loaded shares a fstring, to get rid of dangling path name. Fixed up 5931857281ce45c1c277aa86d1588119ab00a955. [Bug #16041] diff --git a/load.c b/load.c index 9fad2bd..19b4d71 100644 --- a/load.c +++ b/load.c @@ -1015,7 +1015,7 @@ rb_require_internal(VALUE fname, int safe) https://github.com/ruby/ruby/blob/trunk/load.c#L1015 RUBY_DTRACE_HOOK(FIND_REQUIRE_RETURN, RSTRING_PTR(fname)); if (found) { - if (!path || !(ftptr = load_lock(RSTRING_PTR(path)))) { + if (!path || !(path = rb_fstring(path), ftptr = load_lock(RSTRING_PTR(path)))) { result = 0; } else if (!*ftptr) { -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/