summaryrefslogtreecommitdiff
path: root/re.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-04-08 01:50:21 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-04-08 01:50:21 +0000
commit0e3a147bd44f90391be47eee62a65749eacd0184 (patch)
treedc476c8a4a2f4b77fc6373928a84900e88c1d540 /re.c
parent86d05f81fd01c674ace8290e376c026c35b07d2c (diff)
* re.c (rb_reg_quote): should always copy the quoting string.
[ruby-core:16235] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@15924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 5a0cae8536..ecbbba0905 100644
--- a/re.c
+++ b/re.c
@@ -1716,7 +1716,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);