* [ruby-core:53158] [ruby-trunk - Bug #8025][Open] Module#included_modules includes classes
@ 2013-03-06 3:38 marcandre (Marc-Andre Lafortune)
2013-05-08 15:49 ` [ruby-core:54869] [Backport 200 - Backport #8025] " nagachika (Tomoyuki Chikanaga)
2013-05-09 14:38 ` [ruby-core:54889] " nagachika (Tomoyuki Chikanaga)
0 siblings, 2 replies; 3+ messages in thread
From: marcandre (Marc-Andre Lafortune) @ 2013-03-06 3:38 UTC (permalink / raw
To: ruby-core
Issue #8025 has been reported by marcandre (Marc-Andre Lafortune).
----------------------------------------
Bug #8025: Module#included_modules includes classes
https://bugs.ruby-lang.org/issues/8025
Author: marcandre (Marc-Andre Lafortune)
Status: Open
Priority: Normal
Assignee: matz (Yukihiro Matsumoto)
Category: core
Target version: current: 2.1.0
ruby -v: r39608
I see two problems in the following code:
module Mixin
end
class C
prepend Mixin
end
C.included_modules # => [Mixin, C, Kernel]
1) C should definitely not be there, since no class should ever appear in that list.
2) I wonder if Mixin should be there, since it was prepended to C, not included.
--
http://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
* [ruby-core:54869] [Backport 200 - Backport #8025] Module#included_modules includes classes
2013-03-06 3:38 [ruby-core:53158] [ruby-trunk - Bug #8025][Open] Module#included_modules includes classes marcandre (Marc-Andre Lafortune)
@ 2013-05-08 15:49 ` nagachika (Tomoyuki Chikanaga)
2013-05-09 14:38 ` [ruby-core:54889] " nagachika (Tomoyuki Chikanaga)
1 sibling, 0 replies; 3+ messages in thread
From: nagachika (Tomoyuki Chikanaga) @ 2013-05-08 15:49 UTC (permalink / raw
To: ruby-core
Issue #8025 has been updated by nagachika (Tomoyuki Chikanaga).
Assignee changed from nagachika (Tomoyuki Chikanaga) to nobu (Nobuyoshi Nakada)
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,
----------------------------------------
Backport #8025: Module#included_modules includes classes
https://bugs.ruby-lang.org/issues/8025#change-39206
Author: marcandre (Marc-Andre Lafortune)
Status: Assigned
Priority: Normal
Assignee: nobu (Nobuyoshi Nakada)
Category:
Target version:
I see two problems in the following code:
module Mixin
end
class C
prepend Mixin
end
C.included_modules # => [Mixin, C, Kernel]
1) C should definitely not be there, since no class should ever appear in that list.
2) I wonder if Mixin should be there, since it was prepended to C, not included.
--
http://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
* [ruby-core:54889] [Backport 200 - Backport #8025] Module#included_modules includes classes
2013-03-06 3:38 [ruby-core:53158] [ruby-trunk - Bug #8025][Open] Module#included_modules includes classes marcandre (Marc-Andre Lafortune)
2013-05-08 15:49 ` [ruby-core:54869] [Backport 200 - Backport #8025] " nagachika (Tomoyuki Chikanaga)
@ 2013-05-09 14:38 ` nagachika (Tomoyuki Chikanaga)
1 sibling, 0 replies; 3+ messages in thread
From: nagachika (Tomoyuki Chikanaga) @ 2013-05-09 14:38 UTC (permalink / raw
To: ruby-core
Issue #8025 has been updated by nagachika (Tomoyuki Chikanaga).
Assignee changed from nobu (Nobuyoshi Nakada) to nagachika (Tomoyuki Chikanaga)
r40614 is an additional commit. Thank you nobu.
----------------------------------------
Backport #8025: Module#included_modules includes classes
https://bugs.ruby-lang.org/issues/8025#change-39227
Author: marcandre (Marc-Andre Lafortune)
Status: Assigned
Priority: Normal
Assignee: nagachika (Tomoyuki Chikanaga)
Category:
Target version:
I see two problems in the following code:
module Mixin
end
class C
prepend Mixin
end
C.included_modules # => [Mixin, C, Kernel]
1) C should definitely not be there, since no class should ever appear in that list.
2) I wonder if Mixin should be there, since it was prepended to C, not included.
--
http://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-05-09 15:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-06 3:38 [ruby-core:53158] [ruby-trunk - Bug #8025][Open] Module#included_modules includes classes marcandre (Marc-Andre Lafortune)
2013-05-08 15:49 ` [ruby-core:54869] [Backport 200 - Backport #8025] " nagachika (Tomoyuki Chikanaga)
2013-05-09 14:38 ` [ruby-core:54889] " nagachika (Tomoyuki Chikanaga)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).