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. --- doc/mruby3.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/mruby3.md b/doc/mruby3.md index fdf21ed19..40869ecee 100644 --- a/doc/mruby3.md +++ b/doc/mruby3.md @@ -32,7 +32,8 @@ pull-request. We have ported some new syntax from CRuby. -* R-assignment (`12 => x`) +* Single line pattern matching (`12 => x`); + mruby matches only with local variables at the moment * Numbered block parameter (`x.map{_1 * 2}`) * End-less `def` (`def double(x) = x*2`) -- cgit v1.2.3