From: "David A. Black" Date: 2005-08-26T22:15:38+09:00 Subject: Re: Circular dependecy on classes Hi -- On Fri, 26 Aug 2005, Anatol Pomozov wrote: > Thanks for your quick answers. > > Somewhere (i did not remember) I saw following trick > > def Soldier > @can_upgrade_to = [:Knight] #This list != list of all ancestors > > def upgrade?(to) > @can_upgrade_to.include?(to.to_s.to_sym) > end > end > > but the solution provided by Derek seems more natural for me. And it has the advantage of working :-) What you've got above (even given that you mean class rather than def) does not work. (See my earlier post.) David -- David A. Black dblack@wobblini.net