From: Pit Capitain Date: 2006-08-18T01:55:44+09:00 Subject: Re: using a module at the toplevel doesn't work Trans schrieb: > Craggy. It's even worse than that! If I delegate via the singelton of > main then: > > class << self > def x; "x"; end > end > > class C > def q; x; end > end > > C.new.q > => NameError: undefined local variable or method `x' for > # > > (*frustrated*) It's not the same as defining at the top level. Tom, defining a method at the top level is the same as defining a private method of Object: def m end is the same as class Object private def m end end What are you trying to do? Regards, Pit