るりまサーチ

最速Rubyリファレンスマニュアル検索!
499件ヒット [1-100件を表示] (0.045秒)
トップページ > クエリ:b[x] > クエリ:RubyVM[x]

別のキーワード

  1. string b
  2. _builtin b
  3. b string
  4. b
  5. b _builtin

検索結果

<< 1 2 3 ... > >>

RubyVM (44000.0)

Ruby の 内部情報へのアクセス手段を提供するクラスです。 デバッグ用、プロトタイピング用、研究用などの とても限定された用途向けです。 一般ユーザーは使うべきではありません。

...Ruby の 内部情報へのアクセス手段を提供するクラスです。
デバッグ用、プロトタイピング用、研究用などの
とても限定された用途向けです。
一般ユーザーは使うべきではありません。...

RubyVM::DEFAULT_PARAMS -> {Symbol => Integer} (24122.0)

RubyVM のデフォルトのパラメータを返します。

...
RubyVM
のデフォルトのパラメータを返します。

[注意] この値は C Ruby 固有のものです。変更しても RubyVM の動作に
は影響しません。また、仕様は変更される場合があるため、この値に依存すべ
きではありません。...

RubyVM::INSTRUCTION_NAMES -> [String] (24022.0)

RubyVM の命令シーケンスの名前の一覧を返します。

...
RubyVM
の命令シーケンスの名前の一覧を返します。

@see RubyVM::InstructionSequence...

RubyVM::OPTS -> [String] (24016.0)

RubyVM のビルドオプションの一覧を返します。

...
RubyVM
のビルドオプションの一覧を返します。...

RubyVM.resolve_feature_path (24006.0)

require を呼んだときに読み込まれるファイルを特定します。 このメソッドはRuby 2.7 で $LOAD_PATH の特異メソッドに移動しました。

...require を呼んだときに読み込まれるファイルを特定します。
このメソッドはRuby 2.7 で $LOAD_PATH の特異メソッドに移動しました。

//emlist[][ruby]{
p RubyVM.resolve_feature_path('set')
# => [:rb, "/build-all-ruby/2.6.0/lib/ruby/2.6.0/set.rb"]
//}...

絞り込み条件を変える

RubyVM::InstructionSequence.load_from_binary(binary) -> RubyVM::InstructionSequence (9335.0)

RubyVM::InstructionSequence#to_binaryにより作られたバイナリフォーマットの文字列からiseqのオブジェクトをロードします。

...
RubyVM
::InstructionSequence#to_binaryにより作られたバイナリフォーマットの文字列からiseqのオブジェクトをロードします。

このローダーは検証機構をもっておらず、壊れたり改変されたバイナリを読み込むと深刻な問題を引き起...
...りません。自分が変換したバイナリデータを使うべきです。

//emlist[例][ruby]{
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
b
inary = 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 (9218.0)

バイナリフォーマットの文字列から埋め込まれたextra_dataを取り出します。

...埋め込まれたextra_dataを取り出します。

//emlist[例][ruby]{
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
b
inary = 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 (9146.0)

バイナリフォーマットでシリアライズされたiseqのデータを文字列として返します。 RubyVM::InstructionSequence.load_from_binary メソッドでバイナリデータに対応する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_bina...
...ry("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\x0...

RubyVM::InstructionSequence.disassemble(body) -> String (9146.0)

引数 body で指定したオブジェクトから作成した RubyVM::InstructionSequence オブジェクトを人間が読める形式の文字 列に変換して返します。

...引数 body で指定したオブジェクトから作成した
RubyVM
::InstructionSequence オブジェクトを人間が読める形式の文字
列に変換して返します。

@param body Proc、Method オブジェクトを指定します。

例1:Proc オブジェクトを指定した場合...
...# /tmp/proc.rb
p = proc { num = 1 + 2 }
puts RubyVM::InstructionSequence.disasm(p)

出力:

== disasm: <RubyVM::InstructionSequence:block in <main>@/tmp/proc.rb>===
== catch table
| catch type: redo st: 0000 ed: 0012 sp: 0000 cont: 0000
| catch type: next st: 0000 ed: 0012 sp: 00...
...------------------------------------------
local table (size: 2, argc: 0 [opts: 0, rest: -1, post: 0, block: -1] s1)
[ 2] num
0000 trace 1 ( 1)
0002 putobject 1
0004 putobject 2
0006 opt_plus <ic:1>
0008 d...

RubyVM::InstructionSequence#base_label -> String (9136.0)

self が表す命令シーケンスの基本ラベルを返します。

...す。

例1:irb で実行した場合

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...
...# 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...

絞り込み条件を変える

<< 1 2 3 ... > >>