From: Marc-Andre Lafortune Date: 2009-09-13T14:46:43+09:00 Subject: [ruby-core:25543] [Bug #1852] Enumerable's #hash Raises ArgumentError When Recursive Values are Present Issue #1852 has been updated by Marc-Andre Lafortune. File recursive_hash.diff added Here is a patch that provides a hash for recursive Array, Hash, Struct and Range. As discussed, there will be hash collisions when recursion is detected, although the hash of a recursive array with 1 element will be different from a recursive hash with 2 elements or from a recursive hash. This makes it possible to use recursive structures as keys. It also re-enables the other related functionalities (Array#-, Set, etc...) I have updated Rubyspecs to test for this, including some complex cases. Is this ok to be committed? ---------------------------------------- http://redmine.ruby-lang.org/issues/show/1852 ---------------------------------------- http://redmine.ruby-lang.org