This project is closed and read-only.
Actions
Backport #8025
closedModule#included_modules includes classes
Backport #8025:
Module#included_modules includes classes
Status:
Closed
Assignee:
Description
Actions
This project is closed and read-only.
Added by marcandre (Marc-Andre Lafortune) over 13 years ago. Updated over 13 years ago.
Description
This issue was solved with changeset r40612.
Marc-Andre, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
class.c: exclude original module
Hello,
A problem seems to remain in case of inherited Class was prepended by a Module.
See the following sample.
module M1; end
class C1
prepend M1
end
class C2 < C1
end
p C1.included_modules # => [M1, Kernel]
p C2.included_modules # => [M1, C1, Kernel]
Thanks,
r40614 is an additional commit. Thank you nobu.
This issue was solved with changeset r40627.
Marc-Andre, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
merge revision(s) 40612,40614: [Backport #8025]
* class.c (rb_mod_included_modules): should not include the original
module itself. [ruby-core:53158] [Bug #8025]
* class.c (rb_mod_included_modules): should not include non-modules.
[ruby-core:53158] [Bug #8025]