るりまサーチ (Ruby 2.3.0)

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

別のキーワード

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

ライブラリ

クラス

検索結果

Method#source_location -> [String, Integer] | nil (54676.0)

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

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

その手続オブジェクトが ruby で定義されていない(つまりネイティブ
である)場合は nil を返します。

@see Proc#source_location

//emlist[例][ruby]{
# ------- /tmp/foo.rb ---------
class Foo
def foo; end
end
# ----- end of /tmp/foo.rb ----

require '/tmp/foo'

m = Foo.new.method(:foo) # => #<Method: Foo#foo>
m.source...