From: James Coglan Date: 2008-11-15T19:16:15+09:00 Subject: Module.nesting for anonymous modules? ------=_Part_15630_12082577.1226744363842 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi list, I'm trying to get a reference to the module that a method is defined in, problem being that the module is generated dynamically so is not part of the AST. foo = Module.new do def m Module.nesting end end => # c = Class.new { include foo } => # c.new.m => [] Is there any way for a method defined like this to get a reference to its containing module? ------=_Part_15630_12082577.1226744363842--