このマニュアルは既にメンテナンスが終了したバージョンの Ruby を対象としています。 最新版のマニュアルへ

Ruby 1.9.3 リファレンスマニュアル

instance method UnboundMethod#source_location

source_location -> [String, Fixnum] | nil[permalink][rdoc]

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

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

[SEE_ALSO] Proc#source_location, Method#source_location