summaryrefslogtreecommitdiff
path: root/doc/syntax/pattern_matching.rdoc
AgeCommit message (Collapse)Author
2024-05-12[Bug #20482] [DOC] Clarify about pattern maching guard clauseNobuyoshi Nakada
Guard clauses can only be used in `case` pattern matching statements, not in `=>`/`in` operators.
2023-02-19[DOC] Update pattern matching docs for 3.2zverok
* Remove section about experimental status * Add references to core objects that can deconstruct Notes: Merged: https://github.com/ruby/ruby/pull/7316
2021-08-19Allow omission of parentheses in one line pattern matching [Feature #16182]Kazuki Tsujimoto
2021-07-17One-line pattern matching is no longer experimentalKazuki Tsujimoto
https://github.com/ruby/dev-meeting-log/blob/master/DevelopersMeeting20210715Japan.md#feature-17724-make-the-pin-operator-support-instanceclassglobal-variables-jeremyevans0
2021-07-15Add pattern matching pin support for instance/class/global variablesJeremy Evans
Pin matching for local variables and constants is already supported, and it is fairly simple to add support for these variable types. Note that pin matching for method calls is still not supported without wrapping in parentheses (pin expressions). I think that's for the best as method calls are far more complex (arguments/blocks). Implements [Feature #17724] Notes: Merged: https://github.com/ruby/ruby/pull/4502
2021-03-21Pattern matching pin operator against expression [Feature #17411]Kazuki Tsujimoto
This commit is based on the patch by @nobu.
2020-12-24doc/syntax/pattern_matching.rdoc: fix typos, grammar, styleMarcus Stollsteimer
2020-12-23Fix a message in example codeKazuki Tsujimoto
Thanks to @zverok for the report.
2020-12-22Update documentation for pattern matchingKazuki Tsujimoto
2020-12-20Fix markups and indentationKazuki Tsujimoto
2020-12-20Fix typosKazuki Tsujimoto
2020-12-20Update documentation for pattern matchingKazuki Tsujimoto
2020-12-13Reintroduce `expr in pat` [Feature #17371]Kazuki Tsujimoto
2020-11-01Pattern matching is no longer experimentalKazuki Tsujimoto
2020-04-05Fix typosKazuki Tsujimoto
2020-04-04Enhance pattern matching introductionzverok
Notes: Merged: https://github.com/ruby/ruby/pull/2952
2020-02-24Add pattern matching documentationzverok
Add separate doc/syntax/pattern_matching.rdoc, add link to control_expressions.rdoc. The documentation is "reverse-engineered" from Ruby 2.7 behavior and early preview presentations, and corrected by pattern-matching feature author @k-tsj. Notes: Merged: https://github.com/ruby/ruby/pull/2786