Skip to content

Commit

Permalink
Merge branch 'failing-multiple-assignments-with-rest-tests' of https:…
Browse files Browse the repository at this point in the history
…//github.com/cremno/mruby into cremno-failing-multiple-assignments-with-rest-tests
  • Loading branch information
matz committed May 31, 2015
2 parents b720cb6 + ba3a0c2 commit 8dd6b0f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/t/syntax.rb
Expand Up @@ -219,6 +219,21 @@ def b
assert_equal 1, a
end

assert('multiple assignment (rest)') do
*a = 0
assert_equal [0], a
end

assert('multiple assignment (rest+post)') do
*a, b = 0, 1, 2
*c, d = 3

assert_equal [0, 1], a
assert_equal [2], b
assert_equal [], c
assert_equal [3], d
end

assert('Return values of case statements') do
a = [] << case 1
when 3 then 2
Expand Down

0 comments on commit 8dd6b0f

Please sign in to comment.