Actions
Backport #8357
closedModule#prepend breaks comparison operator
Status:
Closed
Assignee:
Description
Array < Enumerable # => true
Enumerable.send :prepend, Module.new
Array < Enumerable # => nil
Array.ancestors.include? Enumerable # => true
Same thing happens in 2.0.0-p0.
Possibly similar to what's happening in: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/53106
Updated by marcandre (Marc-Andre Lafortune) almost 11 years ago
- Priority changed from Normal to 6
Ouch.
=== is also broken:
Enumerable.send :prepend, Module.new
Enumerable === [] # => false, should be true
Updated by marcandre (Marc-Andre Lafortune) almost 11 years ago
- Assignee set to nobu (Nobuyoshi Nakada)
Updated by nobu (Nobuyoshi Nakada) almost 11 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
This issue was solved with changeset r40561.
Alex, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
object.c: skip prepending modules
- object.c (rb_obj_is_kind_of): skip prepending modules.
[ruby-core:54742] [Bug #8357] - object.c (rb_class_inherited_p): ditto.
[ruby-core:54736] [Bug #8357]
Updated by nagachika (Tomoyuki Chikanaga) almost 11 years ago
- Tracker changed from Bug to Backport
- Project changed from Ruby master to Backport200
- Status changed from Closed to Assigned
- Assignee changed from nobu (Nobuyoshi Nakada) to nagachika (Tomoyuki Chikanaga)
Updated by nagachika (Tomoyuki Chikanaga) almost 11 years ago
- Status changed from Assigned to Closed
This issue was solved with changeset r40575.
Alex, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
merge revision(s) 40561: [Backport #8357]
* object.c (rb_obj_is_kind_of): skip prepending modules.
[ruby-core:54742] [Bug #8357]
* object.c (rb_class_inherited_p): ditto.
[ruby-core:54736] [Bug #8357]
Actions
Like0
Like0Like0Like0Like0Like0