Project

General

Profile

Actions

Bug #8066

closed

Inconsistency in ancestors chain

Added by prijutme4ty (Ilya Vorontsov) about 11 years ago. Updated over 6 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
1.9.3p0, 2.0.0p0
[ruby-core:53278]

Description

Method including have some inconsistencies. Let's define module and include(or prepend) and then include it in classes in different order.

module M; end
Class.send :include, M
Module.send :include, M
Class.ancestors

=> [Class, M, Module, M, Object, Kernel, BasicObject]

module M; end
Module.send :include, M
Class.send :include, M
Class.ancestors

=> [Class, Module, M, Object, Kernel, BasicObject]

We see that ancestor chains are different. Is it a spec(i didn't find it in tests) or a bug?


Related issues 1 (0 open1 closed)

Is duplicate of Ruby master - Feature #1586: Including a module already present in ancestors should not be ignoredRejectedmatz (Yukihiro Matsumoto)Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0