summaryrefslogtreecommitdiffhomepage
path: root/test/t
diff options
context:
space:
mode:
authorskandhas <[email protected]>2012-11-24 16:21:37 +0800
committerskandhas <[email protected]>2012-11-24 16:21:37 +0800
commitcd8e9c14636fbef835328e50834d0baa41a0e0cf (patch)
tree55231cb24c330bdff87cd47c3cad85a1874003da /test/t
parent59035eb33d5e1b276a1269a38f2cce421a528470 (diff)
downloadmruby-cd8e9c14636fbef835328e50834d0baa41a0e0cf.tar.gz
mruby-cd8e9c14636fbef835328e50834d0baa41a0e0cf.zip
add Module#include? test
Diffstat (limited to 'test/t')
-rw-r--r--test/t/module.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/t/module.rb b/test/t/module.rb
index 511658150..96bded1ee 100644
--- a/test/t/module.rb
+++ b/test/t/module.rb
@@ -92,6 +92,20 @@ assert('Module#include', '15.2.2.4.27') do
Test4Include2.const_get(:Const4Include) == 42
end
+assert('Module#include?', '15.2.2.4.28') do
+ module Test4IncludeP
+ end
+ class Test4IncludeP2
+ include Test4IncludeP
+ end
+ class Test4IncludeP3 < Test4IncludeP2
+ end
+
+ Test4IncludeP2.include?(Test4IncludeP) &&
+ Test4IncludeP3.include?(Test4IncludeP) &&
+ ! Test4IncludeP.include?(Test4IncludeP)
+end
+
assert('Module#included', '15.2.2.4.29') do
module Test4Included
Const4Included = 42