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 | 06bcd6884fe9783d6f1f7e6988bb5d9e21320929 (patch) | |
| tree | 560b8db83b90b8dd49b06902b6037f957df6fc78 /ext/strscan | |
| parent | b5717a7b71fee71e8775f987e764b40026b365c3 (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: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@25546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/strscan')
| -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 6b0d8e7c5..a6b012ceb 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; |
