235件ヒット
[1-100件を表示]
(0.228秒)
ライブラリ
- ビルトイン (103)
-
rexml
/ document (44) -
rexml
/ parsers / pullparser (11) -
rexml
/ parsers / sax2parser (55) -
rexml
/ sax2listener (11) -
rexml
/ streamlistener (11)
クラス
-
REXML
:: Element (11) -
REXML
:: Instruction (33) -
REXML
:: Parsers :: PullEvent (11) -
REXML
:: Parsers :: SAX2Parser (55) -
RubyVM
:: InstructionSequence (97) - TracePoint (6)
モジュール
-
REXML
:: SAX2Listener (11) -
REXML
:: StreamListener (11)
キーワード
-
absolute
_ path (11) -
base
_ label (11) - content= (11)
- disasm (11)
- disassemble (11)
- eval (11)
- instruction? (11)
-
instruction
_ sequence (6) - instructions (11)
- label (11)
- listen (55)
- path (11)
-
processing
_ instruction (11) - target (11)
- target= (11)
-
to
_ a (11) -
to
_ binary (9)
検索結果
先頭5件
- REXML
:: StreamListener # instruction(name , instruction) -> () - RubyVM
:: InstructionSequence # to _ binary(extra _ data = nil) -> String - REXML
:: Element # instructions -> [REXML :: Instraction] - TracePoint
# instruction _ sequence -> RubyVM :: InstructionSequence - REXML
:: SAX2Listener # processing _ instruction(target , data) -> ()
-
REXML
:: StreamListener # instruction(name , instruction) -> () (27515.0) -
XML処理命令(PI)をパースしたときに呼び出されるコールバックメソッドです。
...ソッドです。
@param name ターゲット名が文字列で渡されます
@param instruction 処理命令の内容が文字列で渡されます
=== 例
<?xml-stylesheet type="text/css" href="style.css"?>
というPIに対し
name: "xml-stylesheet"
instruction: " type=\"text/css\" href... -
RubyVM
:: InstructionSequence # to _ binary(extra _ data = nil) -> String (18213.0) -
バイナリフォーマットでシリアライズされたiseqのデータを文字列として返します。 RubyVM::InstructionSequence.load_from_binary メソッドでバイナリデータに対応するiseqオブジェクトを作れます。
...ます。
RubyVM::InstructionSequence.load_from_binary メソッドでバイナリデータに対応するiseqオブジェクトを作れます。
引数の extra_data はバイナリデータと共に保存されます。
RubyVM::InstructionSequence.load_from_binary_extra_data メソッドでこ......_binary で得たバイナリデータは他のマシンに移動できません。他のバージョンや他のアーキテクチャのRubyで作られたバイナリデータは使用できません。
//emlist[例][ruby]{
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
iseq.to_binary(......"extra_data")
# ※表示の都合上改行しているが実際は改行はない
# => "YARB\x02\x00\x00\x00\x03\x00\x00\x00\x16\x02\x00\x00\n\x00\x00\x00\x01
# \x00\x00\x00\x03\x00\x00\x00\x05\x00\x00\x00\x84\x01\x00\x00\x88\x01\x00
# \x00\x02\x02\x00\x00x86_64-darwin15\x00*\x00\x00\x00\x00\x00\x... -
REXML
:: Element # instructions -> [REXML :: Instraction] (15517.0) -
すべての instruction 子ノードの配列を返します。
...すべての instruction 子ノードの配列を返します。
返される配列は freeze されます。... -
TracePoint
# instruction _ sequence -> RubyVM :: InstructionSequence (15508.0) -
script_compiledイベント発生時にコンパイルされた RubyVM::InstructionSequenceインスタンスを返します。
...された
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_c... -
REXML
:: SAX2Listener # processing _ instruction(target , data) -> () (15302.0) -
XML 処理命令(PI)に対し呼び出されるコールバックメソッドです。
...XML 処理命令(PI)に対し呼び出されるコールバックメソッドです。
@param target ターゲット名が文字列で渡されます
@param data 処理命令の内容が文字列で渡されます... -
REXML
:: Parsers :: PullEvent # instruction? -> bool (15202.0) -
XML処理命令なら真を返します。
XML処理命令なら真を返します。 -
RubyVM
:: InstructionSequence # absolute _ path -> String | nil (15201.0) -
self が表す命令シーケンスの絶対パスを返します。
...ら作成していた場合は nil を返します。
例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 # base _ label -> String (15201.0) -
self が表す命令シーケンスの基本ラベルを返します。
...iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.base_label
# => "<compiled>"
例2: RubyVM::InstructionSequence.compile_file を使用した場合
# /tmp/method.rb
def hello
puts "hello, world"
end
# irb
>......iseq = RubyVM::InstructionSequence.compile_file('/tmp/method.rb')
> iseq.base_label # => "<main>"
例3:
# /tmp/method2.rb
def hello
puts "hello, world"
end
RubyVM::InstructionSequence.of(method(:hello)).base_label
# => "hello"
@see RubyVM::InstructionSequence#label... -
RubyVM
:: InstructionSequence # disasm -> String (15201.0) -
self が表す命令シーケンスを人間が読める形式の文字列に変換して返します。
...間が読める形式の文字列に変換して返します。
puts RubyVM::InstructionSequence.compile('1 + 2').disasm
出力:
== disasm: <RubyVM::InstructionSequence:<compiled>@<compiled>>==========
0000 trace 1 ( 1)
0002 putob......ject 1
0004 putobject 2
0006 opt_plus <ic:1>
0008 leave
@see RubyVM::InstructionSequence.disasm... -
RubyVM
:: InstructionSequence # disassemble -> String (15201.0) -
self が表す命令シーケンスを人間が読める形式の文字列に変換して返します。
...間が読める形式の文字列に変換して返します。
puts RubyVM::InstructionSequence.compile('1 + 2').disasm
出力:
== disasm: <RubyVM::InstructionSequence:<compiled>@<compiled>>==========
0000 trace 1 ( 1)
0002 putob......ject 1
0004 putobject 2
0006 opt_plus <ic:1>
0008 leave
@see RubyVM::InstructionSequence.disasm...