diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-03-17 07:25:58 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-03-17 07:25:58 +0000 |
commit | 4067fd028dfdaeaa177755e5d2ff54511da8a7fc (patch) | |
tree | 8960d3348fcf795dfa9eb87dc24e8356a06ed255 | |
parent | c9e0df64b52ce2534929ea3a4424564dfb521c26 (diff) | |
download | ruby-4067fd028dfdaeaa177755e5d2ff54511da8a7fc.tar.gz |
* hash.c (rb_hash_aset): allow recursive key. [ruby-core:24648]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | hash.c | 3 |
2 files changed, 4 insertions, 3 deletions
@@ -1,3 +1,7 @@ +Wed Mar 17 16:25:53 2010 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * hash.c (rb_hash_aset): allow recursive key. [ruby-core:24648] + Wed Mar 17 06:39:59 2010 Nobuyoshi Nakada <nobu@ruby-lang.org> * ruby.h (rb_warning, rb_sys_warning): fixed typo in rdoc. @@ -1096,9 +1096,6 @@ rb_hash_aset(VALUE hash, VALUE key, VALUE val) { rb_hash_modify(hash); hash_update(hash, key); - if (hash == key) { - rb_raise(rb_eArgError, "recursive key for hash"); - } if (RHASH(hash)->ntbl->type == &identhash || rb_obj_class(key) != rb_cString) { st_insert(RHASH(hash)->ntbl, key, val); } |