24件ヒット
[1-24件を表示]
(0.075秒)
ライブラリ
- ビルトイン (24)
クラス
- Proc (12)
-
RubyVM
:: InstructionSequence (12)
キーワード
-
source
_ location (12) -
to
_ a (12)
検索結果
-
Proc
# source _ location -> [String , Integer] | nil (31.0) -
ソースコードのファイル名と行番号を配列で返します。
...l を返します。
//emlist[例][ruby]{
# /path/to/target.rb を実行
proc {}.source_location # => ["/path/to/target.rb", 1]
proc {}.source_location # => ["/path/to/target.rb", 2]
(eval "proc {}").source_location # => ["(eval)", 1]
method(:p).to_proc.source_location # =>... -
RubyVM
:: InstructionSequence # to _ a -> Array (19.0) -
self の情報を 14 要素の配列にして返します。
...ベルでは "<main>"。文字列から作成していた場合は
"<compiled>"。
: #path
命令シーケンスの相対パス。文字列から作成していた場合は "<compiled>"。
: #absolute_path
命令シーケンスの絶対パス。文字列から作成していた場合は ni......シーケンスの 1 行目の行番号。
: type
命令シーケンスの種別。
:top、:method、:block、:class、:rescue、:ensure、:eval、:main、
:defined_guard のいずれか。
: locals
全ての引数名、ローカル変数名からなる Symbol の配列。
: args
引...