From 4067fd028dfdaeaa177755e5d2ff54511da8a7fc Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 17 Mar 2010 07:25:58 +0000 Subject: * 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 --- hash.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'hash.c') diff --git a/hash.c b/hash.c index dda685012c..0b863bd637 100644 --- a/hash.c +++ b/hash.c @@ -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); } -- cgit v1.2.3