ruby-changes:15085
From: nobu <ko1@a...>
Date: Wed, 17 Mar 2010 16:26:17 +0900 (JST)
Subject: [ruby-changes:15085] Ruby:r26961 (trunk): * hash.c (rb_hash_aset): allow recursive key.
nobu 2010-03-17 16:25:58 +0900 (Wed, 17 Mar 2010) New Revision: 26961 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=26961 Log: * hash.c (rb_hash_aset): allow recursive key. [ruby-core:24648] Modified files: trunk/ChangeLog trunk/hash.c Index: ChangeLog =================================================================== --- ChangeLog (revision 26960) +++ ChangeLog (revision 26961) @@ -1,3 +1,7 @@ +Wed Mar 17 16:25:53 2010 Nobuyoshi Nakada <nobu@r...> + + * hash.c (rb_hash_aset): allow recursive key. [ruby-core:24648] + Wed Mar 17 06:39:59 2010 Nobuyoshi Nakada <nobu@r...> * ruby.h (rb_warning, rb_sys_warning): fixed typo in rdoc. Index: hash.c =================================================================== --- hash.c (revision 26960) +++ hash.c (revision 26961) @@ -1096,9 +1096,6 @@ { 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); } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/