diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-10-31 19:45:17 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-11-02 15:14:36 +0900 |
| commit | dc886873bcc294e41242016ce1aa30406a98853b (patch) | |
| tree | b8b5e2b1b514bdb8a43e9110d5e0601672bf890f /doc/mruby3.md | |
| parent | 70ee9363671ff5aead633807b9579dab22f94cf3 (diff) | |
| download | mruby-dc886873bcc294e41242016ce1aa30406a98853b.tar.gz mruby-dc886873bcc294e41242016ce1aa30406a98853b.zip | |
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.
Diffstat (limited to 'doc/mruby3.md')
| -rw-r--r-- | doc/mruby3.md | 3 |
1 files changed, 2 insertions, 1 deletions
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`) |
