diff options
| author | skandhas <[email protected]> | 2012-11-12 20:21:38 +0800 |
|---|---|---|
| committer | skandhas <[email protected]> | 2012-11-12 20:21:38 +0800 |
| commit | fc6703878d51ddedd0a5b3323d06a3287ef26537 (patch) | |
| tree | 235012efa9b29bd0e576d2d9b6ffc96dea4a4a11 /test | |
| parent | 191d1391c66ddca71bf9e19f5af18478e73428d7 (diff) | |
| parent | 38ce9516aa4611110b3084699db6c18cf7e99ad9 (diff) | |
| download | mruby-fc6703878d51ddedd0a5b3323d06a3287ef26537.tar.gz mruby-fc6703878d51ddedd0a5b3323d06a3287ef26537.zip | |
Merge branch 'add-cvars' into pr-add-class-variables
Diffstat (limited to 'test')
| -rw-r--r-- | test/t/module.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/t/module.rb b/test/t/module.rb index 1827d5758..ff8178cb0 100644 --- a/test/t/module.rb +++ b/test/t/module.rb @@ -31,6 +31,19 @@ assert('Module#append_features', '15.2.2.4.10') do Test4AppendFeatures2.const_get(:Const4AppendFeatures2) == Test4AppendFeatures2 end +assert('Module#class_variables', '15.2.2.4.19') do + class Test4ClassVariables1 + @@var1 = 1 + @@var2 = 2 + end + class Test4ClassVariables2 < Test4ClassVariables1 + @@var3 = 2 + end + + Test4ClassVariables1.class_variables == [:@@var1, :@@var2] && + Test4ClassVariables2.class_variables == [:@@var3] +end + assert('Module#const_defined?', '15.2.2.4.20') do module Test4ConstDefined Const4Test4ConstDefined = true |
