diff options
| author | Daniel Bovensiepen <[email protected]> | 2012-11-27 23:01:09 +0800 |
|---|---|---|
| committer | Daniel Bovensiepen <[email protected]> | 2012-11-27 23:01:09 +0800 |
| commit | 75849788a5cdf9e6545326ab1c90f9d39d0edf9e (patch) | |
| tree | 541d1d34e508f3a11fe846f8b136a39ab223baeb /test | |
| parent | 712d6b8cd27e3f06dc08ea62b2a100ae0c328235 (diff) | |
| parent | 2ea245db3dd439cf179bbe120177ddcd086e4707 (diff) | |
| download | mruby-75849788a5cdf9e6545326ab1c90f9d39d0edf9e.tar.gz mruby-75849788a5cdf9e6545326ab1c90f9d39d0edf9e.zip | |
Merge remote-tracking branch 'upstream/master' into mrbgems
Diffstat (limited to 'test')
| -rw-r--r-- | test/t/module.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/t/module.rb b/test/t/module.rb index 96bded1ee..e666a1763 100644 --- a/test/t/module.rb +++ b/test/t/module.rb @@ -132,6 +132,26 @@ assert('Module#included_modules', '15.2.2.4.30') do r.class == Array and r.include?(Test4includedModules) end +assert('Module#instance_methods', '15.2.2.4.33') do + module Test4InstanceMethodsA + def method1() end + end + class Test4InstanceMethodsB + def method2() end + end + class Test4InstanceMethodsC < Test4InstanceMethodsB + def method3() end + end + + r = Test4InstanceMethodsC.instance_methods(true) + + Test4InstanceMethodsA.instance_methods == [:method1] and + Test4InstanceMethodsB.instance_methods(false) == [:method2] and + Test4InstanceMethodsC.instance_methods(false) == [:method3] and + r.class == Array and r.include?(:method3) and r.include?(:method2) +end + + # Not ISO specified assert('Module#to_s') do |
