るりまサーチ

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

別のキーワード

  1. etc sc_xopen_enh_i18n
  2. openssl n
  3. pop n_bytes
  4. pop n_mails
  5. rsa n=

検索結果

<< 1 2 3 > >>

REXML::StreamListener#instruction(name, instruction) -> () (27515.0)

XML処理命令(PI)をパースしたときに呼び出されるコールバックメソッドです。

...ソッドです。

@param name ターゲット名が文字列で渡されます
@param instruction 処理命令の内容が文字列で渡されます

=== 例
<?xml-stylesheet type="text/css" href="style.css"?>
というPIに対し
n
ame: "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...

絞り込み条件を変える

<< 1 2 3 > >>