Skip to content

Commit 9de733f

Browse files
committedSep 23, 2013
Fix Module#ancestors to also include modules in hierarchy
1 parent ba205fb commit 9de733f

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed
 

‎corelib/module.rb

+5
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ def ancestors
5454
5555
while (parent) {
5656
result.push(parent);
57+
58+
if (parent.$included_modules) {
59+
result = result.concat(parent.$included_modules)
60+
}
61+
5762
parent = parent._super;
5863
}
5964

‎spec/filters/bugs/array.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
opal_filter "Array" do
2-
fails "Array includes Enumerable"
32
fails "Array#at raises a TypeError when the passed argument can't be coerced to Integer"
43

54
fails "Array#clone copies singleton methods"

0 commit comments

Comments
 (0)
Please sign in to comment.