In article <E1KiMpb-0004YT-EO / x61.netlab.jp>,
  Yukihiro Matsumoto <matz / ruby-lang.org> writes:

> I am very interested in how one can make recursive range where range
> objects are basically immutable.

% limit stacksize 500k
% ./ruby -ve '        
  class CyclicRange < Range
    def <=>(other); true; end
  end
  o = CyclicRange.allocate
  o.instance_eval { initialize(o, o) }
  p o
'
ruby 1.9.0 (2008-09-15 revision 19356) [i686-linux]
-e:7:in `inspect': stack level too deep (SystemStackError)
        from -e:7:in `inspect'
        from -e:7:in `inspect'
        from -e:7:in `inspect'
        from -e:7:in `inspect'
        from -e:7:in `inspect'
        from -e:7:in `inspect'
        from -e:7:in `inspect'
        from -e:7:in `inspect'
         ... 592 levels...
        from -e:7:in `inspect'
        from -e:7:in `inspect'
        from -e:7:in `p'
        from -e:7:in `<main>'
-- 
Tanaka Akira