Skip to content

Commit

Permalink
Data#deconstruct と Data#deconstruct_keys の返り値の型を修正
Browse files Browse the repository at this point in the history
- hash: rdoc の記載のまま hash になっていたがるりまでは Hash とクラスで記載するのが正しい
  - cf. https://docs.ruby-lang.org/en/3.3/Data.html#method-i-deconstruct_keys
  - cf. https://github.com/rurema/doctree/wiki/HowToWriteMethodEntry#%E8%BF%94%E3%82%8A%E5%80%A4%E3%81%AE%E5%9E%8B%E3%81%AE%E8%A8%98%E8%BF%B0%E6%96%B9%E6%B3%95
- array: rdoc の記載のまま array になっていたがるりまでは任意のオブジェクトの配列を返す場合は [object] と記載するのが正しい
  - cf. https://docs.ruby-lang.org/en/3.3/Data.html#method-i-deconstruct_keys
  - cf. https://github.com/rurema/doctree/wiki/HowToWriteMethodEntry#%E8%BF%94%E3%82%8A%E5%80%A4%E3%81%AE%E5%9E%8B%E3%81%AE%E8%A8%98%E8%BF%B0%E6%96%B9%E6%B3%95
  • Loading branch information
sanfrecce-osaka committed Jun 11, 2024
1 parent bd9d24a commit e41ab8c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions refm/api/src/_builtin/Data
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ p dog1.equal?(dog2) # => false

@see [[m:Object#==]], [[m:Data#eql?]]

--- deconstruct -> array
--- deconstruct -> [object]

self のメンバの値を配列で返します。

Expand Down Expand Up @@ -266,7 +266,7 @@ end

@see [[ref:d:spec/pattern_matching#matching_non_primitive_objects]]

--- deconstruct_keys(array_of_names_or_nil) -> hash
--- deconstruct_keys(array_of_names_or_nil) -> Hash

self のメンバの名前と値の組を Hash で返します。

Expand Down

0 comments on commit e41ab8c

Please sign in to comment.