るりまサーチ

最速Rubyリファレンスマニュアル検索!
305件ヒット [201-300件を表示] (0.090秒)

別のキーワード

  1. _builtin >
  2. bigdecimal >
  3. integer >
  4. float >
  5. comparable >

検索結果

<< < 1 2 3 4 > >>

RubyVM::InstructionSequence#first_lineno -> Integer (3101.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#inspect -> String (3101.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#to_a -> Array (3101.0)

self の情報を 14 要素の配列にして返します。

...ます。

命令シーケンスを以下の情報で表します。

: magic

データフォーマットを示す文字列。常に
"YARVInstructionSequence/SimpleDataFormat"。

: major_version

命令シーケンスのメジャーバージョン。

: minor_version

命令シーケンス...
...シーケンスのラ
ベル。トップレベルでは "<main>"。文字列から作成していた場合は
"<compiled>"。

: #path

命令シーケンスの相対パス。文字列から作成していた場合は "<compiled>"。

: #absolute_path

命令シーケンスの絶対パス。...
...y]{
require 'pp'

iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
pp iseq.to_a
# ※ Ruby 2.5.0 での実行結果
# => ["YARVInstructionSequence/SimpleDataFormat",
# 2,
# 0,
# 1,
# {:arg_size=>0, :local_size=>2, :stack_max=>2},
# "<compiled>",
# "<compiled>",
# nil,
# 1,
# :top,
# [:num],...

RubyVM::InstructionSequence#to_binary(extra_data = nil) -> String (3101.0)

バイナリフォーマットでシリアライズされたiseqのデータを文字列として返します。 RubyVM::InstructionSequence.load_from_binary メソッドでバイナリデータに対応するiseqオブジェクトを作れます。

...列として返します。
RubyVM::InstructionSequence.load_from_binary メソッドでバイナリデータに対応するiseqオブジェクトを作れます。

引数の extra_data はバイナリデータと共に保存されます。
RubyVM::InstructionSequence.load_from_binary_extra_data...
...リデータは使用できません。

//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
# \x...
...00\x00\x00\x00
# \xF1\x7F\x00\x00\b\x00\x00\x00\x00\x00\x00\x00E\x7F\x00\x00\x02\x00\x00\x00
# \x00\x00\x00\x00\n\x00\x00\x00\x00\x00\x00\x00<compiled>\xF5\x7F\x00\x00
# \x05\x00\x00\x00\x00\x00\x00\x00E\x7F\x00\x00\x02\x00\x00\x00\x00\x00\x00
# \x00\x03\x00\x00\x00\x00\x00\x00\x00numE\x7F\x00\x00\x...

REXML::Parsers::SAX2Parser#listen(ary) { ... } -> () (113.0)

コールバックをパーサに登録します。

...2Listener#end_prefix_mapping)
* :characters (文字データ, REXML::SAX2Listener#characters)
* :processing_instruction
(XML 処理命令 REXML::SAX2Listener#processing_instruction)
* :doctype
(DTD, REXML::SAX2Listener#doctype)
* :attlistdecl
(DTDの属性リスト宣言, REXML::...

絞り込み条件を変える

REXML::Parsers::SAX2Parser#listen(ary, listener) -> () (113.0)

コールバックをパーサに登録します。

...2Listener#end_prefix_mapping)
* :characters (文字データ, REXML::SAX2Listener#characters)
* :processing_instruction
(XML 処理命令 REXML::SAX2Listener#processing_instruction)
* :doctype
(DTD, REXML::SAX2Listener#doctype)
* :attlistdecl
(DTDの属性リスト宣言, REXML::...

REXML::Parsers::SAX2Parser#listen(listener) -> () (113.0)

コールバックをパーサに登録します。

...2Listener#end_prefix_mapping)
* :characters (文字データ, REXML::SAX2Listener#characters)
* :processing_instruction
(XML 処理命令 REXML::SAX2Listener#processing_instruction)
* :doctype
(DTD, REXML::SAX2Listener#doctype)
* :attlistdecl
(DTDの属性リスト宣言, REXML::...

REXML::Parsers::SAX2Parser#listen(sym) { ... } -> () (113.0)

コールバックをパーサに登録します。

...2Listener#end_prefix_mapping)
* :characters (文字データ, REXML::SAX2Listener#characters)
* :processing_instruction
(XML 処理命令 REXML::SAX2Listener#processing_instruction)
* :doctype
(DTD, REXML::SAX2Listener#doctype)
* :attlistdecl
(DTDの属性リスト宣言, REXML::...

REXML::Parsers::SAX2Parser#listen(sym, ary) { ... } -> () (113.0)

コールバックをパーサに登録します。

...2Listener#end_prefix_mapping)
* :characters (文字データ, REXML::SAX2Listener#characters)
* :processing_instruction
(XML 処理命令 REXML::SAX2Listener#processing_instruction)
* :doctype
(DTD, REXML::SAX2Listener#doctype)
* :attlistdecl
(DTDの属性リスト宣言, REXML::...
<< < 1 2 3 4 > >>