Yes, Object, Class, and Module are more than just constants. Object,
Class, and Module are instances of Class class:
1.9.3p0 :031 Class.class
= Class
1.9.3p0 :032 Module.class
= Class
1.9.3p0 :033 Object.class
= Class
Since Object, Class, and Module are instances of Class class, they
I want to fix a typo. I said:
Since Object, Class, and Module are instances of Class class, they
don't have access to Class's singleton methods, but rather they have
access to Class's instance methods:
I meant to say:
Object and Module do not inherit from Class and so they
don't have access to
Module.is_a?(Class)
Module inherits from Object, Object is an instance of Class.
Object.is_a?(Module)
Object is an instance of Class, Class inherits from Module.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups Ruby
on
3 matches
Mail list logo