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.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/t/syntax.rb b/test/t/syntax.rb
index d21748de1..5ce4e0a63 100644
--- a/test/t/syntax.rb
+++ b/test/t/syntax.rb
@@ -213,6 +213,12 @@ assert('Splat and multiple assignment in for') do
assert_equal 7, f
end
+assert('Splat without assignment') do
+ * = [0]
+ a, * = [1, 2]
+ assert_equal 1, a
+end
+
assert('Return values of case statements') do
a = [] << case 1
when 3 then 2