From: Andrey Kulinich Date: 2003-07-01T20:38:42+09:00 Subject: Re: inifinity recursion && test/unit Brian Candler wrote: >>#!/usr/local/bin/ruby >>require 'test/unit' >> >>module Recur >> def self.new >> Recur.new >> end >>end >> >>class Tests < Test::Unit::TestCase >> def test_1 >> Recur.new >> end >>end > Yep, that's definitely a nice piece of infinite recursion. What are you > trying to achieve? Originally that was an error. Code: - module Recur def self.new Recur.new end class Recur end end Recur.new - But after that I rename class Recur to Another and forgot to change in def self.new. Without test/unit ruby said that there is an infinite recursion. Is that a bug or a feature? > module Recur > def self.new ==> same as def Recur.new Almost. Depends on position of definition. -- with best regards, Andrey Kulinich IT Group Software developer phone/fax +380 (372) 58-43-10 e-mail: Andrey.Kulinich@itgrp.net http://www.itgrp.net