From 99503ab9751c09a2f5467dee4ceb0e30af4e95bd Mon Sep 17 00:00:00 2001 From: Joshua Young Date: Thu, 20 Mar 2025 18:44:10 +1000 Subject: [PATCH] Escape `Binding` reference in pattern matching docs --- doc/syntax/pattern_matching.rdoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/syntax/pattern_matching.rdoc b/doc/syntax/pattern_matching.rdoc index 0b37ebdda7..c43919ba14 100644 --- a/doc/syntax/pattern_matching.rdoc +++ b/doc/syntax/pattern_matching.rdoc @@ -221,7 +221,7 @@ For hash patterns, even a simpler form exists: key-only specification (without a end #=> "matched: 1" -Binding works for nested patterns as well: +\Binding works for nested patterns as well: case {name: 'John', friends: [{name: 'Jane'}, {name: 'Rajesh'}]} in name:, friends: [{name: first_friend}, *] @@ -249,7 +249,7 @@ The "rest" part of a pattern also can be bound to a variable: end #=> "matched: 1, {b: 2, c: 3}" -Binding to variables currently does NOT work for alternative patterns joined with |: +\Binding to variables currently does NOT work for alternative patterns joined with |: case {a: 1, b: 2} in {a: } | Array