Ruby Issue Tracking System: Issueshttps://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?17113305112008-12-28T13:46:34ZRuby Issue Tracking System
Redmine Ruby 1.8 - Bug #937 (Rejected): Recursive Hashes As Keyshttps://bugs.ruby-lang.org/issues/9372008-12-28T13:46:34Zdgtized (Charles Comstock)dgtized@gmail.com
<p>=begin<br>
On 1.8.7 hashes which use themselves as keys appear to lack a meaningful value, yet are stored correctly in the keys and values list.</p>
<p>$ ruby -v<br>
ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux]<br>
$ ruby -e 'h = {}; h[h] = h; p h,h[h],h.keys[0],h.values[0]'<br>
{{...}=>{...}}<br>
nil<br>
{{...}=>{...}}<br>
{{...}=>{...}}</p>
<p>Is this intended behavior or a bug?<br>
=end</p>