diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-10-28 16:11:20 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-10-28 16:11:20 +0000 |
commit | 3750847f550d5d483e85cbe4e300dfd219a2095e (patch) | |
tree | 560b8db83b90b8dd49b06902b6037f957df6fc78 /ext | |
parent | dbddc90b892f32d2862ae386134e422be9c0eee4 (diff) |
merges r24679 from trunk into ruby_1_9_1.
--
* 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/branches/ruby_1_9_1@25546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r-- | ext/strscan/strscan.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/strscan/strscan.c b/ext/strscan/strscan.c index 6b0d8e7c52..a6b012ceb0 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; |