るりまサーチ

最速Rubyリファレンスマニュアル検索!
12件ヒット [1-12件を表示] (0.188秒)
トップページ > 種類:インスタンスメソッド[x] > クエリ:t[x] > クエリ:ruby[x] > クラス:UnboundMethod[x] > クエリ:source_location[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 (24245.0)

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

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

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

T
ime.instance_method(:zone).source_location # => nil
T
ime.instance_method(:httpdate).source_location # => ["/Users/user/.rbenv/versions/2.4.3/lib/ruby/2...
....4.0/time.rb", 654]
//}

@see Proc#source_location, Method#source_location...