From dc886873bcc294e41242016ce1aa30406a98853b Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Sat, 31 Oct 2020 19:45:17 +0900 Subject: Replace `R-assignment` by `single-line pattern matching`. Since `R-assignment` in CRuby is abandoned. Single-line pattern matching in `mruby` only matches single local variable at the moment. Currently it works as a right assignment to a local variable. It will be enhanced in the future. --- test/t/syntax.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'test') diff --git a/test/t/syntax.rb b/test/t/syntax.rb index a52e0dcea..ae698c385 100644 --- a/test/t/syntax.rb +++ b/test/t/syntax.rb @@ -345,13 +345,9 @@ assert('splat object in assignment') do assert_equal [2], (a = *o) end -assert('right-ward assignment') do +assert('one-line pattern match') 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 -- cgit v1.2.3