るりまサーチ

最速Rubyリファレンスマニュアル検索!
33件ヒット [1-33件を表示] (0.093秒)
トップページ > クエリ:i[x] > クエリ:NS[x] > クエリ:absolute_path[x]

別のキーワード

  1. socket af_ns
  2. socket pf_ns
  3. resolv ns
  4. constants pf_ns
  5. constants af_ns

ライブラリ

キーワード

検索結果

RubyVM::InstructionSequence#absolute_path -> String | nil (27213.0)

self が表す命令シーケンスの絶対パスを返します。

...していた場合は nil を返します。

例1:irb で実行した場合

i
seq = RubyVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
i
seq.absolute_path
# => nil

例2: RubyVM::InstructionSequence.compile_file を使用した場合...
...# /tmp/method.rb
def hello
puts "hello, world"
end

# irb
> iseq = RubyVM::InstructionSequence.compile_file('/tmp/method.rb')
> iseq.absolute_path # => "/tmp/method.rb"

@see RubyVM::InstructionSequence#path...

RubyVM::InstructionSequence#path -> String (9106.0)

self が表す命令シーケンスの相対パスを返します。

...いた
場合は "<compiled>" を返します。

例1:irb で実行した場合

i
seq = RubyVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
i
seq.path
# => "<compiled>"

例2: RubyVM::InstructionSequence.compile_file を使用した場...
...

# /tmp/method.rb
def hello
puts "hello, world"
end

# irb
> iseq = RubyVM::InstructionSequence.compile_file('method.rb')
> iseq.path # => "method.rb"

@see RubyVM::InstructionSequence#absolute_path...

RubyVM::InstructionSequence#to_a -> Array (9006.0)

self の情報を 14 要素の配列にして返します。

...ンスを以下の情報で表します。

: magic

データフォーマットを示す文字列。常に
"YARVInstructionSequence/SimpleDataFormat"。

: major_version

命令シーケンスのメジャーバージョン。

: minor_version

命令シーケンスのマイナーバージ...
...ータフォーマットを示す数値。常に 1。

: misc

以下の要素から構成される Hash オブジェクト。

:arg_size: メソッド、ブロックが取る引数の総数(1 つもない場合は 0)。

:local_size: ローカル変数の総数 + 1。

:stack_max: ス...
...in>"。文字列から作成していた場合は
"<compiled>"。

: #path

命令シーケンスの相対パス。文字列から作成していた場合は "<compiled>"。

: #absolute_path

命令シーケンスの絶対パス。文字列から作成していた場合は nil。

: #first_li...