Skip to content

Commit

Permalink
プリミティブなオブジェクト以外とのマッチ -> 非プリミティブなオブジェクトのマッチ
Browse files Browse the repository at this point in the history
Co-authored-by: shuichi <[email protected]>

cf. #2773 (comment)
  • Loading branch information
sanfrecce-osaka committed Feb 4, 2023
1 parent 7a533e0 commit d04656c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion refm/doc/spec/pattern_matching.rd
Original file line number Diff line number Diff line change
Expand Up @@ -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 パターンで利用されます) が実装されたオブジェクトにマッチします。
Expand Down

0 comments on commit d04656c

Please sign in to comment.