Actions
Bug #14744
closedRefinements modules have a superclass
Description
$ ruby -e 'module M; refine Array do; p self; p self.class; p ancestors; end; end'
#<refinement:Array@M>
Module
[#<refinement:Array@M>, Array, Enumerable, Object, Kernel, BasicObject]
So the refinement module (self in the refine Array do
block) is a Module, but looking at its ancestors it has Array as a "superclass".
Is that expected?
I thought modules can never have a superclass in Ruby.
Actions
Like0
Like0Like0Like0Like0Like0Like0Like0Like0