summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--test/t/module.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/t/module.rb b/test/t/module.rb
index 1827d5758..bec1d7b45 100644
--- a/test/t/module.rb
+++ b/test/t/module.rb
@@ -31,6 +31,18 @@ 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
+ @@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