From: Brian Candler Date: 2009-11-17T20:24:12+09:00 Subject: Re: Class inside a Method Body The class wouldn't be defined until the method is executed, and would be re-opened each time the method is executed. That's almost certainly not what you want (*). If you want a private helper class, I suggest you do it like this: class MyClass class MyHelper ... end def my_method MyHelper.new(...) end end Regards, Brian. (*) And if you really do, then you can use: k = Class.new or k = Class.new(superclass) or use 'eval' to define your class. -- Posted via http://www.ruby-forum.com/.