Actions
Bug #17423
closed`Prepend` should prepend a module before the class
ruby -v:
Description
I see
module M; end
module A; end
class B; include A; end
A.prepend M
B.prepend M
p B.ancestors
gives [B, M, A, Object, Kernel, BasicObject]
now. It used to be [M, B, A, Object, Kernel, BasicObject]
.
I think it should be prepended to class B
. Probably it should be [M, B, M, A, Object, Kernel, BasicObject]
.
The reason behind this change may be duplication removing, but considering the following code, it is OK to duplicate prepende modules.
module M; end
class A; end
class B<A; end
A.prepend M
B.prepend M
p B.ancestors # => [M, B, M, A, Object, Kernel, BasicObject]
Am I missing something?
Matz.
Actions
Like0
Like0Like0Like0Like0Like0