summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/t/module.rb13
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