diff options
| author | cremno <[email protected]> | 2015-05-07 16:58:43 +0200 |
|---|---|---|
| committer | cremno <[email protected]> | 2015-05-07 16:58:43 +0200 |
| commit | 2aa59393bafa24421ff6c5b90de59af8a25f927c (patch) | |
| tree | 28688fbb165a73c4f8371cd79dfccac842f48eab /test/t/syntax.rb | |
| parent | 2fe556d9c039839c20965a2c90dff703f04e40ec (diff) | |
| download | mruby-2aa59393bafa24421ff6c5b90de59af8a25f927c.tar.gz mruby-2aa59393bafa24421ff6c5b90de59af8a25f927c.zip | |
fix splat without assignment; fix #2781
The parser generates NODE_NIL for tSTAR without argument in masgns. The
codegen didn't handle that.
Diffstat (limited to 'test/t/syntax.rb')
| -rw-r--r-- | test/t/syntax.rb | 6 |
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 |
