るりまサーチ (Ruby 2.4.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.021秒)
トップページ > バージョン:2.4.0[x] > クラス:UnboundMethod[x] > クエリ:Method#source_location[x]

別のキーワード

  1. << rexml::attribute#name
  2. add rexml::attribute#name
  3. handle_interrupt thread#raise
  4. oid openssl::x509::extension#oid=
  5. oid= openssl::x509::extension#oid

ライブラリ

検索結果

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

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

...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.4.0/time.rb", 654]
//}

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