summaryrefslogtreecommitdiffhomepage
path: root/test/t/syntax.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/t/syntax.rb')
-rw-r--r--test/t/syntax.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/t/syntax.rb b/test/t/syntax.rb
index 2621e1b19..d21748de1 100644
--- a/test/t/syntax.rb
+++ b/test/t/syntax.rb
@@ -255,6 +255,16 @@ assert('Return values of if and case statements') do
assert_equal 1, true_clause_value
end
+assert('Return values of no expression case statement') do
+ when_value =
+ case
+ when true
+ 1
+ end
+
+ assert_equal 1, when_value
+end
+
assert('splat in case statement') do
values = [3,5,1,7,8]
testa = [1,2,7]