るりまサーチ

最速Rubyリファレンスマニュアル検索!
722件ヒット [601-700件を表示] (0.189秒)

別のキーワード

  1. _builtin new
  2. _builtin inspect
  3. _builtin []
  4. _builtin to_s
  5. _builtin each

ライブラリ

モジュール

キーワード

検索結果

<< < ... 5 6 7 8 > >>

RubyVM::InstructionSequence.disasm(body) -> String (8024.0)

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

...-----------------------------------------------------
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:...
...==========
0000 trace 8 ( 1)
0002 trace 1 ( 2)
0004 putself
0005 putstring "hello, world"
0007 send :puts, 1, nil, 8, <ic:0>
0013 trace 16...

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

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

...-----------------------------------------------------
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:...
...==========
0000 trace 8 ( 1)
0002 trace 1 ( 2)
0004 putself
0005 putstring "hello, world"
0007 send :puts, 1, nil, 8, <ic:0>
0013 trace 16...

Object#freeze -> self (8012.0)

オブジェクトを凍結(内容の変更を禁止)します。

...`破壊的な操作' と呼ばれるもの一般です。変数への参照自体を凍結したい
場合は、グローバル変数なら Kernel.#trace_var が使えます。

@return self を返します。

//emlist[][ruby]{
a1 = "foo".freeze
a1 = "bar"
p a1 #=> "bar"

a2 = "foo".freeze
a2.repla...
...ます。

//emlist[][ruby]{
a = [1].freeze
p a.frozen? #=> true

a[0] = "foo"
p a # can't modify frozen Array (RuntimeError)

b = a.dup
p b #=> [1]
p b.frozen? #=> false

b[0] = "foo"
p b #=> ["foo"]
//}

@see Object#frozen?,Object#dup,Kernel.#trace_var...
...ます。

//emlist[][ruby]{
a = [1].freeze
p a.frozen? #=> true

a[0] = "foo"
p a # can't modify frozen Array (FrozenError)

b = a.dup
p b #=> [1]
p b.frozen? #=> false

b[0] = "foo"
p b #=> ["foo"]
//}

@see Object#frozen?,Object#dup,Kernel.#trace_var...

Kernel.#caller(range) -> [String] | nil (8006.0)

start 段上の呼び出し元の情報を $@ の形式のバックトレース(文字列の配列)として返します。

...を指定します。

@param range 取得したいスタックの範囲を示す Range オブジェクトを指定します。

@see Kernel.#set_trace_func,Kernel.#raise,
Kernel.#caller_locations

//emlist[例][ruby]{
def foo
p caller(0)
p caller(1)
p caller(2)
p caller(3)
p caller(4...

Kernel.#caller(start = 1) -> [String] | nil (8006.0)

start 段上の呼び出し元の情報を $@ の形式のバックトレース(文字列の配列)として返します。

...を指定します。

@param range 取得したいスタックの範囲を示す Range オブジェクトを指定します。

@see Kernel.#set_trace_func,Kernel.#raise,
Kernel.#caller_locations

//emlist[例][ruby]{
def foo
p caller(0)
p caller(1)
p caller(2)
p caller(3)
p caller(4...

絞り込み条件を変える

Kernel.#caller(start, length) -> [String] | nil (8006.0)

start 段上の呼び出し元の情報を $@ の形式のバックトレース(文字列の配列)として返します。

...を指定します。

@param range 取得したいスタックの範囲を示す Range オブジェクトを指定します。

@see Kernel.#set_trace_func,Kernel.#raise,
Kernel.#caller_locations

//emlist[例][ruby]{
def foo
p caller(0)
p caller(1)
p caller(2)
p caller(3)
p caller(4...

RubyVM::InstructionSequence#disasm -> String (8006.0)

self が表す命令シーケンスを人間が読める形式の文字列に変換して返します。

...uts RubyVM::InstructionSequence.compile('1 + 2').disasm

出力:

== disasm: <RubyVM::InstructionSequence:<compiled>@<compiled>>==========
0000 trace 1 ( 1)
0002 putobject 1
0004 putobject 2
0006 opt_plus <ic:...

RubyVM::InstructionSequence#disassemble -> String (8006.0)

self が表す命令シーケンスを人間が読める形式の文字列に変換して返します。

...uts RubyVM::InstructionSequence.compile('1 + 2').disasm

出力:

== disasm: <RubyVM::InstructionSequence:<compiled>@<compiled>>==========
0000 trace 1 ( 1)
0002 putobject 1
0004 putobject 2
0006 opt_plus <ic:...

RubyVM::InstructionSequence#to_a -> Array (8006.0)

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

...# 2,
# 0,
# 1,
# {:arg_size=>0, :local_size=>2, :stack_max=>2},
# "<compiled>",
# "<compiled>",
# nil,
# 1,
# :top,
# [:num],
# 0,
# [],
# [1,
# [:trace, 1],
# [:putobject_OP_INT2FIX_O_1_C_],
# [:putobject, 2],
# [:opt_plus, {:mid=>:+, :flag=>256, :orig_argc=>1, :blockptr=>nil}],
# [:dup],
# [...

RubyVM::InstructionSequence.compile_option -> Hash (8006.0)

命令シーケンスのコンパイル時のデフォルトの最適化オプションを Hash で返 します。

...timization=>false,
# :specialized_instruction=>true,
# :operands_unification=>true,
# :instructions_unification=>false,
# :stack_caching=>false,
# :trace_instruction=>true,
# :frozen_string_literal=>false,
# :debug_frozen_string_literal=>false,
# :coverage_enabled=>true,
# :debug_level=>0}
//}

@see...

絞り込み条件を変える

<< < ... 5 6 7 8 > >>