From: Benoit Daloze Date: 2010-06-27T22:56:31+09:00 Subject: Re: Singleton class in Ruby On 27 June 2010 16:43, Manoj Kumar wrote: > As you said   class << o; self; end > > In Rails, there is a method called metaclass which is defined in Object > > def metaclass >  class << self >    self >  end > end Yes, and this method is now deprecated because of the wrong name. The chosen name is ... singleton_class ;) So, the answer, in Ruby 1.9 is > > "mystr".singleton_class => #> > is #> the singleton class object for object > o? yes. B.D.