From: ts Date: 2001-11-19T17:48:26+09:00 Subject: [ruby-talk:25830] Re: Would like feedback on script to remove unused import statements in java >>>>> "R" == Ralph Mason writes: R> Does class << self is creating an unnamed subclass? In this case, no. In ruby a class is an object like any other objects, this mean that it has a class, it's called the metaclass. When you create a class, ruby automatically create its metaclass. In this example class << self make reference to the metaclass For an object : * instance variable are stored in the object (this is why each object has its own instance) * method are stored in the class This is the same for a class * class instance variable are stored in the class * class methods are stored in the class of the class, i.e. the metaclass In my example @foo, @bar are in the class Foo::foo, Foo::bar are in the metaclass Guy Decoux