summaryrefslogtreecommitdiff
path: root/re.c
diff options
context:
space:
mode:
Diffstat (limited to 're.c')
-rw-r--r--re.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/re.c b/re.c
index a405f9f57a..e2d5e9dc14 100644
--- a/re.c
+++ b/re.c
@@ -1754,7 +1754,7 @@ rb_reg_quote(str)
goto meta_found;
}
}
- return str;
+ return rb_str_new3(str);
meta_found:
tmp = rb_str_new(0, RSTRING(str)->len*2);