aris
1
inheritance chain:
Class -> Module -> Object
Kernel.is_a?(Module) # => true
Kernel is an instance of Module, which in turn inherits from Object.
So how is Kernel an ancestor of Object?
I found it on line 262 of “The Ruby P.ming Language”:
“The Kernel module is an ancestor of Object.”
It would be more correct to say that Object includes the Kernel module.
see Class: Object (Ruby 1.9.3)
Dheeraj K.
Dheeraj K. wrote in post #1077704:
It would be more correct to say that Object includes the Kernel module.
see Class: Object (Ruby 1.9.3)
When a class includes a module, ruby creates an anonymous class out of
the module and inserts into the inheritance chain directly above the
includer.