diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-10-15 18:31:06 +0900 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-10-15 18:31:06 +0900 |
| commit | 9cebddf9fe83ae0acde6f64f291fa3c9fc22880f (patch) | |
| tree | 6f9ca4f2941c3da48a504c937719adca36e4cdfe /test/t/syntax.rb | |
| parent | 8c276f95be2f4e9deed73f08125a23a6746cb517 (diff) | |
| parent | 21e07d61138a87891dc780efaa28e6c76a39378f (diff) | |
| download | mruby-9cebddf9fe83ae0acde6f64f291fa3c9fc22880f.tar.gz mruby-9cebddf9fe83ae0acde6f64f291fa3c9fc22880f.zip | |
Merge pull request #5084 from mruby/mruby3
Mruby3
Diffstat (limited to 'test/t/syntax.rb')
| -rw-r--r-- | test/t/syntax.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/t/syntax.rb b/test/t/syntax.rb index 436c06601..a52e0dcea 100644 --- a/test/t/syntax.rb +++ b/test/t/syntax.rb @@ -345,6 +345,15 @@ assert('splat object in assignment') do assert_equal [2], (a = *o) end +assert('right-ward assignment') do + 1 => a + assert_equal(1, a) + 13.divmod(5) => a,b + assert_equal([2,3], [a, b]) + 13.divmod(5) => a,b => c, d + assert_equal([2,3,2,3], [a, b, c, d]) +end + assert('splat object in case statement') do o = Object.new def o.to_a |
