From: Eero Saynatkari Date: 2005-12-15T06:22:44+09:00 Subject: Re: Same class, different module Caleb Tennis wrote: > Here's a small snippet of code I'm trying to hack on: > > > > What I'm trying to accomplish is having B reference A but in the same > module > its currently in. I can accomplish this by redefining the initialize > method > again in Mod2::B, such that it looks exactly the same as Mod1::B, but > I'm > hoping to find a trick to avoid having to do that. > > Any thoughts? You could use #const_get, possibly, since a method call is dynamic. > Caleb E -- Posted via http://www.ruby-forum.com/.