From: John Morrice Date: 2010-11-23T00:11:37+09:00 Subject: Re: get module names > I would like to know the module names I have declared in other file > but I don't know how to do it. From $ ri Module.constants (from ruby core) ------------------------------------------------------------------------------ Module.constants -> array ------------------------------------------------------------------------------ Returns an array of the names of all constants defined in the system. This list includes the names of all modules and classes. Also, I discovered this for myself in about 1 minute with irb, by doing this: irb(main):001:0> module A irb(main):002:1> module B irb(main):003:2> end irb(main):004:1> end => nil irb(main):005:0> A.methods.sort => ...here I looked at the list of methods... irb(main):006:0> A.constants => [:B] Wishing you happy learnings, Johnny