diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-04-03 06:30:56 -0700 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-04-03 06:30:56 -0700 |
| commit | 9a0fba7f0decf77cbef49e4277b72e9276399047 (patch) | |
| tree | 9ac3050b05944a0b2e4134c202e39d03dca19596 /test/t/module.rb | |
| parent | 6bd49a3d95c836e82382f333a600a368bf0638fc (diff) | |
| parent | 4bb7243c2b9ad9d5e1e84f519ac676300a85428e (diff) | |
| download | mruby-9a0fba7f0decf77cbef49e4277b72e9276399047.tar.gz mruby-9a0fba7f0decf77cbef49e4277b72e9276399047.zip | |
Merge pull request #1128 from monaka/pr-add-iso-confomance-tests-20130402
Add ISO confomance tests
Diffstat (limited to 'test/t/module.rb')
| -rw-r--r-- | test/t/module.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/t/module.rb b/test/t/module.rb index 6c1c1acda..1ff9d3aea 100644 --- a/test/t/module.rb +++ b/test/t/module.rb @@ -129,6 +129,21 @@ assert('Module#const_get', '15.2.2.4.23') do Test4ConstSet.const_get(:Const4Test4ConstSet) == 23 end +assert('Module.constants', '15.2.2.4.24') do + $n = [] + module TestA + Const = 1 + end + class TestB + include TestA + Const2 = 1 + $n = constants.sort + end + + TestA.constants == [ :Const ] and + $n == [ :Const, :Const2 ] +end + assert('Module#include', '15.2.2.4.27') do module Test4Include Const4Include = 42 |
