るりまサーチ

最速Rubyリファレンスマニュアル検索!
49件ヒット [1-49件を表示] (0.019秒)

別のキーワード

  1. instructionsequence disassemble
  2. instructionsequence disasm
  3. instructionsequence absolute_path
  4. instructionsequence path
  5. instructionsequence inspect

ライブラリ

キーワード

検索結果

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

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

...l を返します。

例1:irb で実行した場合

iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.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 (21036.0)

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

..." を返します。

例1:irb で実行した場合

iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.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 (21012.0)

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

...場合は
"<compiled>"。

: #path

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

: #absolute_path

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

: #first_lineno

命令シーケンスの 1 行...
...ytecode

命令シーケンスを構成する命令とオペランドの配列の配列。


//emlist[例][ruby]{
require 'pp'

iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
pp iseq.to_a
# ※ Ruby 2.5.0 での実行結果
# => ["YARVInstructionSequence/SimpleDataFormat",
# 2,
# 0,
# 1...

NEWS for Ruby 2.0.0 (42.0)

NEWS for Ruby 2.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...ic)
* 追加: RubyVM::InstructionSequence.of to get the instruction sequence
from a method or a block.
* 追加: RubyVM::InstructionSequence#path,
RubyVM::InstructionSequence
#absolute_path,
RubyVM::InstructionSequence
#label,
RubyVM::InstructionSequence
#base_label,...

NEWS for Ruby 2.7.0 (18.0)

NEWS for Ruby 2.7.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...発生させます。 10344

* File
* 新規メソッド
* パスが絶対パスかどうかをポータブルに判定するFile.absolute_path?メソッドが追加されました。 15868
* 変更されたメソッド
* Windows以外のプラットフォームでFile.extname...
...上昇しました。
詳細はhttps://github.com/ruby/ruby/pull/2583を
参照してください。

* RubyVM::InstructionSequence
* RubyVM::InstructionSequence#to_binaryメソッドは
コンパイルされたバイナリを生成します。
そのバイナリサイ...

絞り込み条件を変える