summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2013-04-24 21:56:03 -0700
committerYukihiro "Matz" Matsumoto <[email protected]>2013-04-24 21:56:03 -0700
commitf0bea86437e46cec11d1fe5f9c3ab7ab8933161d (patch)
tree341314a55f834f1edf71f21b3de6947ffbbbbbbe /test
parente70b2721a627dee19349431619ec13693095c7e0 (diff)
parent8d778d9860792d9af81d97db25d9f8000327bee9 (diff)
downloadmruby-f0bea86437e46cec11d1fe5f9c3ab7ab8933161d.tar.gz
mruby-f0bea86437e46cec11d1fe5f9c3ab7ab8933161d.zip
Merge pull request #1211 from skandhas/pr-fix-Module-ancestors
fix the behavior of Module#ancestors
Diffstat (limited to 'test')
-rw-r--r--test/t/module.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/t/module.rb b/test/t/module.rb
index 23dacb44d..41ee8d8df 100644
--- a/test/t/module.rb
+++ b/test/t/module.rb
@@ -14,8 +14,12 @@ end
# TODO not implemented ATM assert('Module.nesting', '15.2.2.3.2') do
assert('Module#ancestors', '15.2.2.4.9') do
+ class Test4ModuleAncestors
+ end
+ sc = Test4ModuleAncestors.singleton_class
r = String.ancestors
- r.class == Array and r.include?(String) and r.include?(Object)
+ r.class == Array and r.include?(String) and r.include?(Object) and
+ ! sc.ancestors.include?(sc)
end
assert('Module#append_features', '15.2.2.4.10') do