5件ヒット
[1-5件を表示]
(0.032秒)
別のキーワード
種類
- インスタンスメソッド (4)
- 特異メソッド (1)
クラス
- Proc (1)
-
RubyVM
:: InstructionSequence (3) - TracePoint (1)
キーワード
-
instruction
_ sequence (1) -
load
_ from _ binary (1) -
source
_ location (1) -
to
_ a (1)
検索結果
先頭5件
-
RubyVM
:: InstructionSequence # eval -> object (63328.0) -
self の命令シーケンスを評価してその結果を返します。
self の命令シーケンスを評価してその結果を返します。
RubyVM::InstructionSequence.compile("1 + 2").eval # => 3 -
TracePoint
# instruction _ sequence -> RubyVM :: InstructionSequence (18643.0) -
script_compiledイベント発生時にコンパイルされた RubyVM::InstructionSequenceインスタンスを返します。
script_compiledイベント発生時にコンパイルされた
RubyVM::InstructionSequenceインスタンスを返します。
//emlist[例][ruby]{
TracePoint.new(:script_compiled) do |tp|
p tp.instruction_sequence # => <RubyVM::InstructionSequence:block in <main>@(eval):1>
end.enable do
eval("puts 'hello'")
end
//}
@raise RuntimeError :script_comp... -
Proc
# source _ location -> [String , Integer] | nil (18343.0) -
ソースコードのファイル名と行番号を配列で返します。
ソースコードのファイル名と行番号を配列で返します。
その手続オブジェクトが ruby で定義されていない(つまりネイティブ
である)場合は nil を返します。
//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 # => ... -
RubyVM
:: InstructionSequence . load _ from _ binary(binary) -> RubyVM :: InstructionSequence (9325.0) -
RubyVM::InstructionSequence#to_binaryにより作られたバイナリフォーマットの文字列からiseqのオブジェクトをロードします。
RubyVM::InstructionSequence#to_binaryにより作られたバイナリフォーマットの文字列からiseqのオブジェクトをロードします。
このローダーは検証機構をもっておらず、壊れたり改変されたバイナリを読み込むと深刻な問題を引き起こします。
他者により提供されたバイナリデータはロードすべきではありません。自分が変換したバイナリデータを使うべきです。
//emlist[例][ruby]{
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
binary = iseq.to_binary
RubyVM:... -
RubyVM
:: InstructionSequence # to _ a -> Array (9025.0) -
self の情報を 14 要素の配列にして返します。
self の情報を 14 要素の配列にして返します。
命令シーケンスを以下の情報で表します。
: magic
データフォーマットを示す文字列。常に
"YARVInstructionSequence/SimpleDataFormat"。
: major_version
命令シーケンスのメジャーバージョン。
: minor_version
命令シーケンスのマイナーバージョン。
: format_type
データフォーマットを示す数値。常に 1。
: misc
以下の要素から構成される Hash オブジェクト。
:arg_size: メソッド、ブ...