るりまサーチ

最速Rubyリファレンスマニュアル検索!
36件ヒット [1-36件を表示] (0.020秒)
トップページ > クエリ:int[x] > クラス:Proc[x]

別のキーワード

  1. socket int
  2. prime int_from_prime_division
  3. _builtin to_int
  4. mkmf convertible_int
  5. option int

ライブラリ

キーワード

検索結果

Proc#arity -> Integer (101.0)

Proc オブジェクトが受け付ける引数の数を返します。

...
Proc
オブジェクトが受け付ける引数の数を返します。

ただし、可変長引数を受け付ける場合、負の整数

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

を返します。

//emlist[例][ruby]{
lambda{ }.arity # => 0
lambda{|| }.arity # => 0
lambd...

Proc#hash -> Integer (101.0)

self のハッシュ値を返します。

self のハッシュ値を返します。

Proc#source_location -> [String, Integer] | nil (101.0)

ソースコードのファイル名と行番号を配列で返します。

...mlist[例][ruby]{
# /path/to/target.rb を実行
proc
{}.source_location # => ["/path/to/target.rb", 1]
proc
{}.source_location # => ["/path/to/target.rb", 2]
(eval "proc {}").source_location # => ["(eval)", 1]
method(:p).to_proc.source_location # => nil
//}

@see Method#sour...