るりまサーチ

最速Rubyリファレンスマニュアル検索!
155件ヒット [101-155件を表示] (0.114秒)
トップページ > クエリ:C[x] > クエリ:method[x] > 種類:インスタンスメソッド[x] > クラス:UnboundMethod[x]

別のキーワード

  1. _builtin to_c
  2. etc sc_2_c_dev
  3. etc sc_2_c_bind
  4. tracer display_c_call
  5. tracer display_c_call=

ライブラリ

キーワード

検索結果

<< < 1 2 >>

UnboundMethod#arity -> Integer (3122.0)

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

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

//emlist[例][ruby]{
c
lass C
def one; end
def two(a); end
def three(*a); end
def four(a, b); end
def five(a, b, *c); end
def six(a, b, *c, &d); end
end

p C.instance...
..._method(:one).arity #=> 0
p C.instance_method(:two).arity #=> 1
p C.instance_method(:three).arity #=> -1
p C.instance_method(:four).arity #=> 2
p C.instance_method(:five).arity #=> -3
p C.instance_method(:six).arity #=> -3


String.instance_method(:size).arity #=> 0
String.i...
...nstance_method(:replace).arity #=> 1
String.instance_method(:squeeze).arity #=> -1
String.instance_method(:count).arity #=> -1
//}...

UnboundMethod#parameters -> [object] (3114.0)

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

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

詳しくは Method#parameters を参照してください。



@see Proc#parameters, Method#parameters...

UnboundMethod#==(other) -> bool (3032.0)

自身と other が同じクラスあるいは同じモジュールの同じメソッドを表す場合に true を返します。そうでない場合に false を返します。

...@param other 自身と比較したいオブジェクトを指定します。

//emlist[例][ruby]{
a = String.instance_method(:size)
b = String.instance_method(:size)
p a == b #=> true

c
= Array.instance_method(:size)
p a == c #=> false
//}...

UnboundMethod#eql?(other) -> bool (3032.0)

自身と other が同じクラスあるいは同じモジュールの同じメソッドを表す場合に true を返します。そうでない場合に false を返します。

...@param other 自身と比較したいオブジェクトを指定します。

//emlist[例][ruby]{
a = String.instance_method(:size)
b = String.instance_method(:size)
p a == b #=> true

c
= Array.instance_method(:size)
p a == c #=> false
//}...

UnboundMethod#original_name -> Symbol (3026.0)

オリジナルのメソッド名を返します。

...オリジナルのメソッド名を返します。

//emlist[例][ruby]{
c
lass C
def foo; end
alias bar foo
end
C
.instance_method(:bar).original_name # => :foo
//}

@see Method#original_name...

絞り込み条件を変える

<< < 1 2 >>