summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2017-08-01 11:39:18 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2017-08-01 15:37:21 +0900
commit9e10afe1d0ee1fb751182e42044e891b4b13f9a4 (patch)
tree880a62052f924ad037dedaca434e474f820a91ed /test
parent16aafdd8660dc301b49254e7ccaa887ab3a458de (diff)
downloadmruby-9e10afe1d0ee1fb751182e42044e891b4b13f9a4.tar.gz
mruby-9e10afe1d0ee1fb751182e42044e891b4b13f9a4.zip
Implements `Module::nesting' (15.2.2.3.2); ref #600, #3200
Diffstat (limited to 'test')
-rw-r--r--test/t/module.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/t/module.rb b/test/t/module.rb
index e32cac5f1..107bea875 100644
--- a/test/t/module.rb
+++ b/test/t/module.rb
@@ -29,6 +29,18 @@ end
# TODO not implemented ATM assert('Module.nesting', '15.2.2.3.2') do
+assert('Module.nesting', '15.2.2.2.2') do
+ module Test4ModuleNesting
+ module Test4ModuleNesting2
+ assert_equal [Test4ModuleNesting2, Test4ModuleNesting],
+ Module.nesting
+ end
+ end
+ module Test4ModuleNesting::Test4ModuleNesting2
+ assert_equal [Test4ModuleNesting::Test4ModuleNesting2], Module.nesting
+ end
+end
+
assert('Module#ancestors', '15.2.2.4.9') do
class Test4ModuleAncestors
end