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 /hash.c | |
parent | 6942afef5f8eb829b85b05bbea59c9eb9214739c (diff) | |
download | ruby-f3f43cdbee1703afd92f9f6dbb471642bcede9f5.tar.gz |
* 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 'hash.c')
-rw-r--r-- | hash.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -1073,6 +1073,7 @@ replace_i(VALUE key, VALUE val, VALUE hash) static VALUE rb_hash_replace(VALUE hash, VALUE hash2) { + rb_hash_modify_check(hash); hash2 = to_hash(hash2); if (hash == hash2) return hash; rb_hash_clear(hash); |