ruby-changes:64368
From: Kazuki <ko1@a...>
Date: Sun, 20 Dec 2020 13:36:06 +0900 (JST)
Subject: [ruby-changes:64368] 85ec6cc387 (master): Fix markups and indentation
https://git.ruby-lang.org/ruby.git/commit/?id=85ec6cc387 From 85ec6cc38767320bc8767298c909f75e61b0d63b Mon Sep 17 00:00:00 2001 From: Kazuki Tsujimoto <kazuki@c...> Date: Sun, 20 Dec 2020 13:28:40 +0900 Subject: Fix markups and indentation diff --git a/doc/syntax/pattern_matching.rdoc b/doc/syntax/pattern_matching.rdoc index 284a5b1..a4af301 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. https://github.com/ruby/ruby/blob/trunk/doc/syntax/pattern_matching.rdoc#L60 Patterns can be: -* any Ruby object (matched by <code>===</code> operator, like in +when+); (_Value pattern_) -* array pattern: <code>[<subpattern>, <subpattern>, <subpattern>, ...]</code>; (_Array pattern_) -* find pattern: <code>[*variable, <subpattern>, <subpattern>, <subpattern>, ..., *variable]</code>; (_Find pattern_) -* hash pattern: <code>{key: <subpattern>, key: <subpattern>, ...}</code>; (_Hash pattern_) -* combination of patterns with <code>|</code>; (_Alternative pattern_) -* variable capture: <code>variable</code> or <code><pattern> => variable</code>; (_Variable pattern_, _As pattern_) +* any Ruby object (matched by <code>===</code> operator, like in +when+); (<em>Value pattern</em>) +* array pattern: <code>[<subpattern>, <subpattern>, <subpattern>, ...]</code>; (<em>Array pattern</em>) +* find pattern: <code>[*variable, <subpattern>, <subpattern>, <subpattern>, ..., *variable]</code>; (<em>Find pattern</em>) +* hash pattern: <code>{key: <subpattern>, key: <subpattern>, ...}</code>; (<em>Hash pattern</em>) +* combination of patterns with <code>|</code>; (<em>Alternative pattern</em>) +* variable capture: <code>variable</code> or <code><pattern> => variable</code>; (<em>Variable pattern</em>, <em>As pattern</em>) Any pattern can be nested inside array/find/hash patterns where <code><subpattern></code> is specified. @@ -443,8 +443,8 @@ Approximate syntax is: https://github.com/ruby/ruby/blob/trunk/doc/syntax/pattern_matching.rdoc#L443 | 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 v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/