るりまサーチ (Ruby 3.3)

最速Rubyリファレンスマニュアル検索!
2件ヒット [1-2件を表示] (0.051秒)
トップページ > クエリ:new[x] > クエリ:int[x] > バージョン:3.3[x] > クエリ:arity[x]

別のキーワード

  1. openssl new
  2. _builtin new
  3. rexml/document new
  4. resolv new
  5. socket new

ライブラリ

クラス

検索結果

NEWS for Ruby 3.0.0 (78217.0)

NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...YAML. 8382
* Use officially discouraged. Read OpenStruct@Caveats section.
* Pathname
* Ractor compatible.
* Psych
* Update to Psych 3.3.0
* This version is Ractor compatible.
* Reline
* Update to Reline 0.1.5
* RubyGems
* Update to RubyGems 3.2.3
* StringIO
* U...

Method#arity -> Integer (54802.0)

メソッドが受け付ける引数の数を返します。

メソッドが受け付ける引数の数を返します。

ただし、メソッドが可変長引数を受け付ける場合、負の整数

-(必要とされる引数の数 + 1)

を返します。C 言語レベルで実装されたメソッドが可変長引数を
受け付ける場合、-1 を返します。

//emlist[例][ruby]{
class C
def u; end
def v(a); end
def w(*a); end
def x(a, b); end
def y(a, b, *c); end
def z(a, b, *...