るりまサーチ

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

別のキーワード

  1. fiddle ruby_free
  2. rbconfig ruby
  3. fiddle build_ruby_platform
  4. rake ruby
  5. rubygems/defaults ruby_engine

ライブラリ

キーワード

検索結果

UnboundMethod#source_location -> [String, Integer] | nil (139.0)

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

... ruby で定義されていない(つまりネイティブ
である)場合は nil を返します。

//emlist[例][ruby]{
require 'time'

Time.instance_method(:zone).source_location # => nil
Time.instance_method(:httpdate).source_location # => ["/Users/user/.rbenv/versions/2.4.3/lib/ruby/2...

UnboundMethod#arity -> Integer (115.0)

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

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

//emlist[例][ruby]{
class 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...

UnboundMethod#hash -> Integer (115.0)

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

...自身のハッシュ値を返します。


//emlist[例][ruby]{
a = method(:==).unbind
b = method(:eql?).unbind
p a.eql? b # => true
p a.hash == b.hash # => true
p [a, b].uniq.size # => 1
//}...

UnboundMethod#owner -> Class | Module (38.0)

このメソッドが定義されている class か module を返します。

...このメソッドが定義されている class か module を返します。

//emlist[例][ruby]{
Integer
.instance_method(:to_s).owner # => Integer
Integer
.instance_method(:to_c).owner # => Numeric
Integer
.instance_method(:hash).owner # => Kernel
//}...