summaryrefslogtreecommitdiff
path: root/test/ruby/test_pattern_matching.rb
AgeCommit message (Collapse)Author
2021-02-02merge revision(s) 1b89b99941548fdb65305dd9a412082e7fdba45a: [Backport #17534]NARUSE, Yui
Mark pattern labels as unremoveable Peephole optimization doesn't play well with find pattern at least. The only case when a pattern matching could have unreachable patterns is when we have lasgn/dasgn node, which shouldn't happen in real-life. Fixes https://bugs.ruby-lang.org/issues/17534 --- compile.c | 2 +- test/ruby/test_pattern_matching.rb | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-)
2020-12-23Make NoMatchingPatternError a subclass of StandardErrorKazuki Tsujimoto
2020-12-13Reintroduce `expr in pat` [Feature #17371]Kazuki Tsujimoto
2020-11-01Pattern matching is no longer experimentalKazuki Tsujimoto
2020-10-26Assoc pattern matching (#3703)Nobuyoshi Nakada
[Feature #17260] One-line pattern matching using tASSOC R-assignment is rejected instead. Notes: Merged-By: nobu <nobu@ruby-lang.org>
2020-06-27Suppress "assigned but unused variable" warningsKazuki Tsujimoto
2020-06-27Add #deconstruct cache to find patternVladimir Dementyev
Notes: Merged: https://github.com/ruby/ruby/pull/3104
2020-06-27Optimize array pattern matching by caching #deconstruct valueVladimir Dementyev
Notes: Merged: https://github.com/ruby/ruby/pull/3104
2020-06-14Introduce find pattern [Feature #16828]Kazuki Tsujimoto
2020-03-03Suppress an "assigned but unused variable" warningYusuke Endoh
2020-03-03Preserve `kwarg` flag and fix up f5c904c2a9Nobuyoshi Nakada
2020-03-02Suppress "assigned but unused variable" warningsYusuke Endoh
2020-03-02Allow newlines inside braced patternNobuyoshi Nakada
2020-03-01Allow trailing comma in hash patternKazuki Tsujimoto
2019-12-21test/ruby/test_pattern_matching.rb: suppress "unused variable" warningYusuke Endoh
2019-12-20Added `experimental` warning categoryNobuyoshi Nakada
[Feature #16420]
2019-11-30Make single line pattern matching void expressionNobuyoshi Nakada
Instead of returning `nil`, raise a syntax error if its value is used. [Feature #16355]
2019-11-28Raise `NoMatchingPatternError` when expr `in` pat doesn't matchNobuyoshi Nakada
* `expr in pattern` should raise `NoMatchingError` when unmatched * `expr in pattern` should return `nil`. (this is unspecified, but this feature is experimental, at all) [Feature #16355]
2019-11-19Avoid needless object allocationKazuki Tsujimoto
2019-11-10Disallow omission of parentheses/brackets in single line pattern matching ↵Kazuki Tsujimoto
[Feature #16182]
2019-11-08Define Struct#deconstruct_keysKazuki Tsujimoto
2019-11-07Disallow duplicated pattern variableKazuki Tsujimoto
2019-10-29Restore `in_kwarg` flag properlyNobuyoshi Nakada
2019-09-26[EXPERIMENTAL] Expression with modifier `in`Nobuyoshi Nakada
[Feature #15865] Notes: Merged: https://github.com/ruby/ruby/pull/2485
2019-09-01Make pattern matching support **nil syntaxKazuki Tsujimoto
2019-06-30Fixed an assertionNobuyoshi Nakada
2019-05-21Simplified the guard against old versionsNobuyoshi Nakada
2019-04-21test/ruby/test_pattern_matching.rb: add missing tests for NODE_DASGN, NODE_LASGNktsj
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-21Add missing test for p_var_refktsj
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-21Add missing tests for p_argsktsj
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-17Suppress warning in assertion tookazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-17Suppress warnings in `make test-all`kazu
suppress "warning: Pattern matching is experimental, and the behavior may change in future versions of Ruby!" git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-17Define Struct#deconstructktsj
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-17Introduce pattern matching [EXPERIMENTAL]ktsj
[ruby-core:87945] [Feature #14912] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e