summaryrefslogtreecommitdiffhomepage
path: root/test/t/module.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/t/module.rb')
-rw-r--r--test/t/module.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/t/module.rb b/test/t/module.rb
index 78cb5d07f..f01245e88 100644
--- a/test/t/module.rb
+++ b/test/t/module.rb
@@ -708,6 +708,15 @@ assert('module with non-class/module outer raises TypeError') do
assert_raise(TypeError) { module []::M2 end }
end
+assert('module to return the last value') do
+ m = module M; :m end
+ assert_equal(m, :m)
+end
+
+assert('module to return nil if body is empty') do
+ assert_nil(module M end)
+end
+
assert('get constant of parent module in singleton class; issue #3568') do
actual = module GetConstantInSingletonTest
EXPECTED = "value"