From: Nobuyoshi Nakada Date: 2006-11-10T15:33:02+09:00 Subject: Re: [ ruby-Bugs-6583 ] self-referential constants Hi, At Thu, 9 Nov 2006 23:43:53 +0900, Erik Hollensbe (erikh) wrote in [ruby-core:09500]: > Honestly, I'm not sure where you'd like to classify this. A bug in the code which makes such references. > It could easily fall under "won't fix", but I figured it's worth > alerting to anyways. It should be fixed, but not in ruby. > given this code: a = [] a << a In any programing languages which can deal with references, you can write similar code. Recursive reference could cause infinite recursive call easily. I don't consider this should be prohibited by the language. It's upto the (your) design. > Blew the stack limit trying to navigate a namespace similar to > this. I think this is a bug because I can't fathom having a constant > that's self-referential, but it's obviously an indication of a poor > design decision on the part of the person who wrote said namespace > structure (which in this case, would be me). Traversal framework would be nice, like the way used in Object#inspect, but more generic. -- Nobu Nakada