Thomas, thanks for your reply. > > So I guess the general rule is: inside module declaration, both self and > current class are set to the module we're declaring. Outside module > declarations, current class is set to the eigenclass of self. > > I hope this is not a complete mess and rubbish :) Consider this case: class SomeClass # self is SomeClass, current class is SomeClass puts "Class Level - #{self}" def some_method # self is an instance, current class is SomeClass puts "Some Method - #{self}" def self.some_inside_class_method # self is an instance, current class is instance's singleton class puts "Inside class method - #{self}" end def some_inside_instance_method # self is an instance, current class is SomeClass puts "Inside instance method - #{self}" end # self is an instance, current class is instance's singleton class instance_eval { puts "Instance instance_eval - #{self}" } # no class_eval for instances end def self.class_method # self is SomeClass, current class is SomeClass's singleton class puts "Class method - #{self}" end # self is SomeClass, current class is SomeClass's singleton class instance_eval { puts "Class instance_eval - #{self}" } # self is SomeClass, current class is SomeClass class_eval { puts "Class class_eval - #{self}" } end Are all the comments correct about self and current class value and are all cases covered (current class modification)? Is def the only method that uses the current class value? I used Class but Module has the same behaviour. Pedro. -- Posted via http://www.ruby-forum.com/.