From d04656cc72d62383118a13b59a4fb81b7888174c Mon Sep 17 00:00:00 2001 From: masatoshi_moritsuka Date: Sat, 4 Feb 2023 16:01:35 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=97=E3=83=AA=E3=83=9F=E3=83=86=E3=82=A3?= =?UTF-8?q?=E3=83=96=E3=81=AA=E3=82=AA=E3=83=96=E3=82=B8=E3=82=A7=E3=82=AF?= =?UTF-8?q?=E3=83=88=E4=BB=A5=E5=A4=96=E3=81=A8=E3=81=AE=E3=83=9E=E3=83=83?= =?UTF-8?q?=E3=83=81=20->=20=E9=9D=9E=E3=83=97=E3=83=AA=E3=83=9F=E3=83=86?= =?UTF-8?q?=E3=82=A3=E3=83=96=E3=81=AA=E3=82=AA=E3=83=96=E3=82=B8=E3=82=A7?= =?UTF-8?q?=E3=82=AF=E3=83=88=E3=81=AE=E3=83=9E=E3=83=83=E3=83=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: shuichi cf. https://github.com/rurema/doctree/pull/2773#discussion_r1063634607 --- refm/doc/spec/pattern_matching.rd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/refm/doc/spec/pattern_matching.rd b/refm/doc/spec/pattern_matching.rd index b0d5c26829..8c0397c657 100644 --- a/refm/doc/spec/pattern_matching.rd +++ b/refm/doc/spec/pattern_matching.rd @@ -478,7 +478,7 @@ end #@end #@# == Matching non-primitive objects: +deconstruct+ and +deconstruct_keys+ -===[a:matching_non_primitive_objects] プリミティブなオブジェクト以外とのマッチ: deconstruct メソッドと deconstruct_keys メソッド +===[a:matching_non_primitive_objects] 非プリミティブなオブジェクトのマッチ: deconstruct メソッドと deconstruct_keys メソッド #@# As already mentioned above, array, find, and hash patterns besides literal arrays and hashes will try to match any object implementing +deconstruct+ (for array/find patterns) or +deconstruct_keys+ (for hash patterns). 既に先述されている通り、配列リテラルやハッシュリテラルの他に Array, Find, Hash パターンは deconstruct メソッド(これは Array/Find パターンで利用されます) か deconstruct_keys メソッド(これは Hash パターンで利用されます) が実装されたオブジェクトにマッチします。