別のキーワード
クラス
- RubyVM (37)
-
RubyVM
:: AbstractSyntaxTree :: Node (49) -
RubyVM
:: InstructionSequence (246) - TracePoint (7)
モジュール
- ObjectSpace (12)
-
RubyVM
:: AbstractSyntaxTree (30) -
RubyVM
:: MJIT (21)
キーワード
- AbstractSyntaxTree (7)
-
DEFAULT
_ PARAMS (12) -
INSTRUCTION
_ NAMES (12) - InstructionSequence (12)
- MJIT (7)
-
NEWS for Ruby 2
. 0 . 0 (12) -
NEWS for Ruby 2
. 3 . 0 (10) -
NEWS for Ruby 2
. 4 . 0 (9) -
NEWS for Ruby 2
. 5 . 0 (8) -
NEWS for Ruby 2
. 6 . 0 (7) -
NEWS for Ruby 2
. 7 . 0 (6) - Node (7)
- OPTS (12)
-
absolute
_ path (12) -
base
_ label (12) - children (7)
- compile (12)
-
compile
_ file (12) -
compile
_ option (12) -
compile
_ option= (12) -
count
_ tdata _ objects (12) - disasm (24)
- disassemble (24)
- enabled? (7)
- eval (12)
-
first
_ column (7) -
first
_ lineno (19) - inspect (19)
-
instruction
_ sequence (7) - label (12)
-
last
_ column (7) -
last
_ lineno (7) -
load
_ from _ binary (10) -
load
_ from _ binary _ extra _ data (10) - new (12)
- of (22)
- parse (10)
-
parse
_ file (10) - path (12)
- pause (7)
-
resolve
_ feature _ path (1) - resume (7)
-
to
_ a (12) -
to
_ binary (10) - type (7)
検索結果
先頭5件
-
RubyVM (50032.0)
-
Ruby の 内部情報へのアクセス手段を提供するクラスです。 デバッグ用、プロトタイピング用、研究用などの とても限定された用途向けです。 一般ユーザーは使うべきではありません。
...Ruby の 内部情報へのアクセス手段を提供するクラスです。
デバッグ用、プロトタイピング用、研究用などの
とても限定された用途向けです。
一般ユーザーは使うべきではありません。... -
RubyVM
. resolve _ feature _ path (27074.0) -
require を呼んだときに読み込まれるファイルを特定します。 このメソッドはRuby 2.7 で $LOAD_PATH の特異メソッドに移動しました。
...require を呼んだときに読み込まれるファイルを特定します。
このメソッドはRuby 2.7 で $LOAD_PATH の特異メソッドに移動しました。
//emlist[][ruby]{
p RubyVM.resolve_feature_path('set')
# => [:rb, "/build-all-ruby/2.6.0/lib/ruby/2.6.0/set.rb"]
//}... -
RubyVM
:: DEFAULT _ PARAMS -> {Symbol => Integer} (27034.0) -
RubyVM のデフォルトのパラメータを返します。
...
RubyVM のデフォルトのパラメータを返します。
[注意] この値は C Ruby 固有のものです。変更しても RubyVM の動作に
は影響しません。また、仕様は変更される場合があるため、この値に依存すべ
きではありません。... -
RubyVM
:: INSTRUCTION _ NAMES -> [String] (27022.0) -
RubyVM の命令シーケンスの名前の一覧を返します。
...
RubyVM の命令シーケンスの名前の一覧を返します。
@see RubyVM::InstructionSequence... -
RubyVM
:: OPTS -> [String] (27016.0) -
RubyVM のビルドオプションの一覧を返します。
...
RubyVM のビルドオプションの一覧を返します。... -
RubyVM
:: InstructionSequence . compile(source , file = nil , path = nil , line = 1 , options = nil) -> RubyVM :: InstructionSequence (9386.0) -
引数 source で指定した Ruby のソースコードを元にコンパイル済みの RubyVM::InstructionSequence オブジェクトを作成して返します。
...引数 source で指定した Ruby のソースコードを元にコンパイル済みの
RubyVM::InstructionSequence オブジェクトを作成して返します。
@param source Ruby のソースコードを文字列で指定します。
@param file ファイル名を文字列で指定しま......かで指定します。詳細は
RubyVM::InstructionSequence.compile_option= を参照
してください。
RubyVM::InstructionSequence.compile("a = 1 + 2")
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
@see RubyVM::InstructionSequence.compile_file... -
RubyVM
:: InstructionSequence . new(source , file = nil , path = nil , line = 1 , options = nil) -> RubyVM :: InstructionSequence (9386.0) -
引数 source で指定した Ruby のソースコードを元にコンパイル済みの RubyVM::InstructionSequence オブジェクトを作成して返します。
...引数 source で指定した Ruby のソースコードを元にコンパイル済みの
RubyVM::InstructionSequence オブジェクトを作成して返します。
@param source Ruby のソースコードを文字列で指定します。
@param file ファイル名を文字列で指定しま......かで指定します。詳細は
RubyVM::InstructionSequence.compile_option= を参照
してください。
RubyVM::InstructionSequence.compile("a = 1 + 2")
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
@see RubyVM::InstructionSequence.compile_file... -
RubyVM
:: InstructionSequence . compile _ file(file , options = nil) -> RubyVM :: InstructionSequence (9379.0) -
引数 file で指定した Ruby のソースコードを元にコンパイル済みの RubyVM::InstructionSequence オブジェクトを作成して返します。
...引数 file で指定した Ruby のソースコードを元にコンパイル済みの
RubyVM::InstructionSequence オブジェクトを作成して返します。
RubyVM::InstructionSequence.compile とは異なり、file、path などの
メタデータは自動的に取得します。
@param......細は
RubyVM::InstructionSequence.compile_option= を参照
してください。
# /tmp/hello.rb
puts "Hello, world!"
# irb
RubyVM::InstructionSequence.compile_file("/tmp/hello.rb")
# => <RubyVM::InstructionSequence:<main>@/tmp/hello.rb>
@see RubyVM::Inst... -
RubyVM
:: InstructionSequence . of(body) -> RubyVM :: InstructionSequence (9371.0) -
引数 body で指定した Proc、Method オブジェクトを元に RubyVM::InstructionSequence オブジェクトを作成して返します。
...クトを元に
RubyVM::InstructionSequence オブジェクトを作成して返します。
@param body Proc、Method オブジェクトを指定します。
例1:irb で実行した場合
# proc
> p = proc { num = 1 + 2 }
> RubyVM::InstructionSequence.of(p)
> # => <RubyVM::InstructionSe......quence:block in irb_binding@(irb)>
# method
> def foo(bar); puts bar; end
> RubyVM::InstructionSequence.of(method(:foo))
> # => <RubyVM::InstructionSequence:foo@(irb)>
例2: RubyVM::InstructionSequence.compile_file を使用した場合
# /tmp/iseq_of.rb
def hello
puts "hello, wor......rb
> require '/tmp/iseq_of.rb'
# hello メソッド
> RubyVM::InstructionSequence.of(method(:hello))
> # => #<RubyVM::InstructionSequence:0x007fb73d7cb1d0>
# グローバル proc
> RubyVM::InstructionSequence.of($a_global_proc)
> # => #<RubyVM::InstructionSequence:0x007fb73d7caf78>......irb
> require '/tmp/iseq_of.rb'
# hello メソッド
> RubyVM::InstructionSequence.of(method(:hello))
> # => #<RubyVM::InstructionSequence:0x007fb73d7cb1d0>
# グローバル proc
> RubyVM::InstructionSequence.of($a_global_proc)
> # => #<RubyVM::InstructionSequence:0x007fb73d7caf78>... -
RubyVM
:: AbstractSyntaxTree . parse(string) -> RubyVM :: AbstractSyntaxTree :: Node (9350.0) -
文字列を抽象構文木にパースし、その木の根ノードを返します。
...文字列を抽象構文木にパースし、その木の根ノードを返します。
@param string パースする対象の Ruby のコードを文字列で指定します。
@param keep_script_lines true を指定すると、 Node#script_lines でノードと関連づけられたソースコ......るようなノードに置き換えてツリーを生成します。
@raise SyntaxError string が Ruby のコードとして正しくない場合に発生します。
//emlist[][ruby]{
pp RubyVM::AbstractSyntaxTree.parse("x = 1 + 2")
# => (SCOPE@1:0-1:9
# tbl: [:x]
# args: nil
# body:......# (LASGN@1:0-1:9 :x
# (OPCALL@1:4-1:9 (LIT@1:4-1:5 1) :+ (LIST@1:8-1:9 (LIT@1:8-1:9 2) nil))))
pp RubyVM::AbstractSyntaxTree.parse("x = 1; p(x; y=2", error_tolerant: true)
# => (SCOPE@1:0-1:15
# tbl: [:x, :y]
# args: nil
# body: (BLOCK@1:0-1:15 (LASGN@1:0-1:5 :x (LIT@...