From 85ec6cc38767320bc8767298c909f75e61b0d63b Mon Sep 17 00:00:00 2001 From: Kazuki Tsujimoto Date: Sun, 20 Dec 2020 13:28:40 +0900 Subject: Fix markups and indentation --- doc/syntax/pattern_matching.rdoc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'doc') diff --git a/doc/syntax/pattern_matching.rdoc b/doc/syntax/pattern_matching.rdoc index 284a5b139b..a4af30177a 100644 --- a/doc/syntax/pattern_matching.rdoc +++ b/doc/syntax/pattern_matching.rdoc @@ -60,12 +60,12 @@ See below for more examples and explanations of the syntax. Patterns can be: -* any Ruby object (matched by === operator, like in +when+); (_Value pattern_) -* array pattern: [, , , ...]; (_Array pattern_) -* find pattern: [*variable, , , , ..., *variable]; (_Find pattern_) -* hash pattern: {key: , key: , ...}; (_Hash pattern_) -* combination of patterns with |; (_Alternative pattern_) -* variable capture: variable or => variable; (_Variable pattern_, _As pattern_) +* any Ruby object (matched by === operator, like in +when+); (Value pattern) +* array pattern: [, , , ...]; (Array pattern) +* find pattern: [*variable, , , , ..., *variable]; (Find pattern) +* hash pattern: {key: , key: , ...}; (Hash pattern) +* combination of patterns with |; (Alternative pattern) +* variable capture: variable or => variable; (Variable pattern, As pattern) Any pattern can be nested inside array/find/hash patterns where is specified. @@ -443,8 +443,8 @@ Approximate syntax is: | Constant[pattern, ..., *variable] find_pattern: [*variable, pattern, ..., *variable] - | Constant(*variable, pattern, ..., *variable) - | Constant[*variable, pattern, ..., *variable] + | Constant(*variable, pattern, ..., *variable) + | Constant[*variable, pattern, ..., *variable] hash_pattern: {key: pattern, key:, ..., **variable} | Constant(key: pattern, key:, ..., **variable) -- cgit v1.2.3