Skip to content

Commit

Permalink
Merge pull request #2879 from cellotak/remove_incrrect_docs
Browse files Browse the repository at this point in the history
fix : Proc#hashメソッドの説明内に誤ってコピーされたと思われる記述を削除
  • Loading branch information
znz authored May 20, 2024
2 parents 5190028 + 8dbcc0f commit c27afe0
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions refm/api/src/_builtin/Proc
Original file line number Diff line number Diff line change
Expand Up @@ -447,21 +447,6 @@ self のハッシュ値を返します。

#@end

Proc オブジェクトの引数の情報を返します。

Proc オブジェクトが引数を取らなければ空の配列を返します。引数を取る場合は、配列の配列を返し、
各配列の要素は引数の種類に対応した以下のような Symbol と、引数名を表す Symbol の 2 要素です。

#@samplecode
prc = proc{|x, y=42, *other|}
p prc.parameters # => [[:opt, :x], [:opt, :y], [:rest, :other]]
prc = lambda{|x, y=42, *other|}
p prc.parameters # => [[:req, :x], [:opt, :y], [:rest, :other]]
prc = proc{|x, y=42, *other|}
p prc.parameters(lambda: true) # => [[:req, :x], [:opt, :y], [:rest, :other]]
prc = lambda{|x, y=42, *other|}
p prc.parameters(lambda: false) # => [[:opt, :x], [:opt, :y], [:rest, :other]]
#@end
#@since 3.2
--- parameters(lambda: nil) -> [object]
#@else
Expand Down

0 comments on commit c27afe0

Please sign in to comment.