aboutsummaryrefslogtreecommitdiffstats
path: root/re.c
diff options
context:
space:
mode:
Diffstat (limited to 're.c')
-rw-r--r--re.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/re.c b/re.c
index 63cfc026de..a967c93452 100644
--- a/re.c
+++ b/re.c
@@ -3518,9 +3518,7 @@ rb_reg_quote(VALUE str)
}
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;