ruby-changes:62572
From: Nobuyoshi <ko1@a...>
Date: Fri, 14 Aug 2020 16:21:47 +0900 (JST)
Subject: [ruby-changes:62572] e658040266 (master): RSTRING_LEN was not used
https://git.ruby-lang.org/ruby.git/commit/?id=e658040266 From e658040266fc57422cfe12f5f6655084e695f6e2 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Fri, 14 Aug 2020 16:12:58 +0900 Subject: RSTRING_LEN was not used diff --git a/re.c b/re.c index 63cfc02..a967c93 100644 --- a/re.c +++ b/re.c @@ -3518,9 +3518,7 @@ rb_reg_quote(VALUE str) https://github.com/ruby/ruby/blob/trunk/re.c#L3518 } t = RSTRING_PTR(tmp); /* copy upto metacharacter */ - const char *p; - long MAYBE_UNUSED(n); - RSTRING_GETMEM(str, p, n); + const char *p = RSTRING_PTR(str); memcpy(t, p, s - p); t += s - p; -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/