From 581cd6cfad346063e3cf08ffded90dfe93bbc236 Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 12 Jun 2017 04:35:52 +0000 Subject: [PATCH] gc.c: duplicate rb_iseq_path by RSTRING_PTR git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- gc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gc.c b/gc.c index 9ff2da545c..5ee5adbdb3 100644 --- a/gc.c +++ b/gc.c @@ -9208,9 +9208,10 @@ static void rb_raw_iseq_info(char *buff, const int buff_size, const rb_iseq_t *iseq) { if (iseq->body->location.label) { + VALUE path = rb_iseq_path(iseq); snprintf(buff, buff_size, "%s %s@%s:%d", buff, RSTRING_PTR(iseq->body->location.label), - RSTRING_PTR(rb_iseq_path(iseq)), + RSTRING_PTR(path), FIX2INT(iseq->body->location.first_lineno)); } }