summaryrefslogtreecommitdiff
path: root/ext/strscan
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-08-26 23:16:40 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-08-26 23:16:40 +0000
commit2ef382231fffd049fce83d742c26084ac8bb959c (patch)
tree3cbdfb7b4b29fba0a8b8839e8eacfef3060d7336 /ext/strscan
parent6cd8f907cf4ab2ea84a90cbb338fd7bd3704a360 (diff)
* ext/strscan/strscan.c (strscan_set_string): set string should not be
dupped or frozen, because freezing it causes #concat method failure, and unnecessary to dup without freezing. a patch from Aaron Patterson at [ruby-core:25145]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/strscan')
-rw-r--r--ext/strscan/strscan.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/strscan/strscan.c b/ext/strscan/strscan.c
index e843e547fb..490689b3d2 100644
--- a/ext/strscan/strscan.c
+++ b/ext/strscan/strscan.c
@@ -321,8 +321,7 @@ strscan_set_string(VALUE self, VALUE str)
Data_Get_Struct(self, struct strscanner, p);
StringValue(str);
- p->str = rb_str_dup(str);
- rb_obj_freeze(p->str);
+ p->str = str;
p->curr = 0;
CLEAR_MATCH_STATUS(p);
return str;