種類
- インスタンスメソッド (162)
- 特異メソッド (150)
- 定数 (22)
- モジュール関数 (11)
- クラス (11)
クラス
- CSV (11)
-
Encoding
:: Converter (11) -
Enumerator
:: ArithmeticSequence (6) -
Net
:: IMAP (20) -
OpenSSL
:: ASN1 :: Sequence (11) -
OpenSSL
:: X509 :: Extension (22) -
RubyVM
:: InstructionSequence (225) - TracePoint (6)
モジュール
-
OpenSSL
:: ASN1 (22) -
Socket
:: Constants (11)
キーワード
- InstructionSequence (11)
-
MSG
_ FLUSH (11) - SEQUENCE (11)
-
absolute
_ path (11) -
base
_ label (11) - compile (11)
-
compile
_ file (11) -
compile
_ option (11) -
compile
_ option= (11) - copy (11)
- disasm (22)
- disassemble (22)
- eval (11)
-
first
_ lineno (11) - inspect (17)
-
instruction
_ sequence (6) - label (11)
-
load
_ from _ binary (9) -
load
_ from _ binary _ extra _ data (9) - move (9)
- new (55)
- of (11)
- path (11)
-
primitive
_ convert (11) -
to
_ a (11) -
to
_ binary (9)
検索結果
先頭5件
- RubyVM
:: InstructionSequence # inspect -> String - RubyVM
:: InstructionSequence - TracePoint
# instruction _ sequence -> RubyVM :: InstructionSequence - OpenSSL
:: ASN1 . # Sequence(value , tag , tagging , tag _ class) -> OpenSSL :: ASN1 :: Sequence - RubyVM
:: InstructionSequence . compile _ file(file , options = nil) -> RubyVM :: InstructionSequence
-
RubyVM
:: InstructionSequence # inspect -> String (24300.0) -
self の情報をラベルとパスを含んだ人間に読みやすい文字列にして返します。
...んだ人間に読みやすい文字列にして返します。
//emlist[例][ruby]{
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
iseq.inspect # => "<RubyVM::InstructionSequence:<compiled>@<compiled>>"
//}
@see RubyVM::InstructionSequence#label,
RubyVM::InstructionSequence#path... -
RubyVM
:: InstructionSequence (24000.0) -
Ruby の Virtual Machine のコンパイル済みの命令シーケンスを表すクラスです。
...Ruby の Virtual Machine のコンパイル済みの命令シーケンスを表すクラスです。
Method、Proc オブジェクトや Ruby のソースコードを表す文字列
から VM の命令シーケンスを得る事ができます。また、
RubyVM::InstructionSequence オブジェク......コンパイラの設定を
扱う必要がありますが、Ruby の VM がどのように働くかを知るのに有用です。
VM の命令シーケンスの一覧はRuby のソースコード中の insns.def から参照で
きます。
* https://github.com/ruby/ruby/blob/master/insns.def... -
TracePoint
# instruction _ sequence -> RubyVM :: InstructionSequence (21707.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_compiled イベントのための
イベントフックの外側で実行した場合に発生します。... -
OpenSSL
:: ASN1 . # Sequence(value , tag , tagging , tag _ class) -> OpenSSL :: ASN1 :: Sequence (21427.0) -
ASN.1 の Sequence 型の値を表現する Ruby のオブジェクトを 生成します。
...の Sequence 型の値を表現する Ruby のオブジェクトを
生成します。
OpenSSL::ASN1::Sequence.new と同じです。
@param value ASN.1値を表すRubyのオブジェクト(OpenSSL::ASN1::ASN1Dataの配列)
@param tag タグ番号
@param tagging タグ付けの方法(:IMPLICIT......もしくは :EXPLICIT)
@param tag_class タグクラス(:UNIVERSAL, :CONTEXT_SPECIFIC, :APPLICATION, :PRIVATE のいずれか)... -
RubyVM
:: InstructionSequence . compile _ file(file , options = nil) -> RubyVM :: InstructionSequence (18800.0) -
引数 file で指定した Ruby のソースコードを元にコンパイル済みの RubyVM::InstructionSequence オブジェクトを作成して返します。
...file で指定した Ruby のソースコードを元にコンパイル済みの
RubyVM::InstructionSequence オブジェクトを作成して返します。
RubyVM::InstructionSequence.compile とは異なり、file、path などの
メタデータは自動的に取得します。
@param file......tions コンパイル時のオプションを true、false、Hash オブ
ジェクトのいずれかで指定します。詳細は
RubyVM::InstructionSequence.compile_option= を参照
してください。
# /tmp/hello.rb
puts "Hello, world!"
# i......rb
RubyVM::InstructionSequence.compile_file("/tmp/hello.rb")
# => <RubyVM::InstructionSequence:<main>@/tmp/hello.rb>
@see RubyVM::InstructionSequence.compile... -
RubyVM
:: InstructionSequence . load _ from _ binary(binary) -> RubyVM :: InstructionSequence (18600.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::InstructionSequence.load_from_binary(binary).eval # => 3
//}
@see RubyVM::InstructionSequence#to_binary... -
RubyVM
:: InstructionSequence . load _ from _ binary _ extra _ data(binary) -> String (18300.0) -
バイナリフォーマットの文字列から埋め込まれたextra_dataを取り出します。
...埋め込まれたextra_dataを取り出します。
//emlist[例][ruby]{
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
binary = iseq.to_binary("extra_data")
RubyVM::InstructionSequence.load_from_binary_extra_data(binary) # => extra_data
//}
@see RubyVM::InstructionSequence#to_binary... -
RubyVM
:: InstructionSequence # to _ binary(extra _ data = nil) -> String (18200.0) -
バイナリフォーマットでシリアライズされたiseqのデータを文字列として返します。 RubyVM::InstructionSequence.load_from_binary メソッドでバイナリデータに対応するiseqオブジェクトを作れます。
...れたiseqのデータを文字列として返します。
RubyVM::InstructionSequence.load_from_binary メソッドでバイナリデータに対応するiseqオブジェクトを作れます。
引数の extra_data はバイナリデータと共に保存されます。
RubyVM::InstructionSequence.......load_from_binary_extra_data メソッドでこの文字列にアクセス出来ます。
注意: 変換後のバイナリデータはポータブルではありません。 to_binary で得たバイナリデータは他のマシンに移動できません。他のバージョンや他のアーキ......テクチャのRubyで作られたバイナリデータは使用できません。
//emlist[例][ruby]{
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
iseq.to_binary("extra_data")
# ※表示の都合上改行しているが実際は改行はない
# => "YARB\x02\x00\x00\x00\x03\x00\x00... -
RubyVM
:: InstructionSequence # first _ lineno -> Integer (18100.0) -
self が表す命令シーケンスの 1 行目の行番号を返します。
...の 1 行目の行番号を返します。
例1:irb で実行した場合
RubyVM::InstructionSequence.compile('num = 1 + 2').first_lineno
# => 1
例2:
# /tmp/method.rb
require "foo-library"
def foo
p :foo
end
RubyVM::InstructionSequence.of(method(:foo)).first_lineno
# => 2... -
RubyVM
:: InstructionSequence . compile(source , file = nil , path = nil , line = 1 , options = nil) -> RubyVM :: InstructionSequence (15900.0) -
引数 source で指定した Ruby のソースコードを元にコンパイル済みの RubyVM::InstructionSequence オブジェクトを作成して返します。
...にコンパイル済みの
RubyVM::InstructionSequence オブジェクトを作成して返します。
@param source Ruby のソースコードを文字列で指定します。
@param file ファイル名を文字列で指定します。
@param path 引数 file の絶対パスファイル名を......。
@param line 引数 source の 1 行目の行番号を指定します。
@param options コンパイル時のオプションを true、false、Hash オブ
ジェクトのいずれかで指定します。詳細は
RubyVM::InstructionSequence.compile_option= を参......照
してください。
RubyVM::InstructionSequence.compile("a = 1 + 2")
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
@see RubyVM::InstructionSequence.compile_file... -
Enumerator
:: ArithmeticSequence # inspect -> String (15300.0) -
自身を人間が読みやすい形の文字列表現にして返します。
自身を人間が読みやすい形の文字列表現にして返します。