diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-02-10 07:31:06 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-02-10 07:31:06 +0000 |
commit | f3f43cdbee1703afd92f9f6dbb471642bcede9f5 (patch) | |
tree | 4f97958bcbb0220be3dd81af4fff045127369f76 /string.c | |
parent | 6942afef5f8eb829b85b05bbea59c9eb9214739c (diff) |
* array.c (rb_ary_push_m, rb_ary_unshift_m, rb_ary_aset),
(rb_ary_insert, rb_ary_replace, rb_ary_concat),
(rb_ary_uniq_bang, rb_ary_flatten_bang): check if frozen after
wrong number of arguments but before TypeError.
[ruby-core:28140]
* hash.c (rb_hash_replace): ditto.
* string.c (rb_str_replace): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -3752,6 +3752,7 @@ rb_str_gsub(int argc, VALUE *argv, VALUE str) VALUE rb_str_replace(VALUE str, VALUE str2) { + str_modifiable(str); if (str == str2) return str; StringValue(str2); |