88件ヒット
[1-88件を表示]
(0.119秒)
クラス
- Object (11)
-
RubyVM
:: InstructionSequence (22) - Thread (11)
キーワード
- OPTS (11)
-
SCRIPT
_ LINES _ _ (11) - caller (33)
-
compile
_ option (11) -
compile
_ option= (11)
検索結果
先頭5件
-
Thread
. DEBUG -> Integer (26321.0) -
スレッドのデバッグレベルを返します。
...れ以外の場合は、スレッドのデバッグログを標準出力に出力します。
初期値は 0 です。
使用するためには、THREAD_DEBUG を -1 にして Ruby をコンパイルする必要が
あります。
//emlist[例][ruby]{
Thread.DEBUG # => 0
//}
@see Thread.DEBUG=... -
RubyVM
:: InstructionSequence . compile _ option -> Hash (20214.0) -
命令シーケンスのコンパイル時のデフォルトの最適化オプションを Hash で返 します。
...//emlist[例][ruby]{
require "pp"
pp RubyVM::InstructionSequence.compile_option
# => {:inline_const_cache=>true,
# :peephole_optimization=>true,
# :tailcall_optimization=>false,
# :specialized_instruction=>true,
# :operands_unification=>true,
# :instructions_unification=>false,
# :stack_caching=>f......alse,
# :trace_instruction=>true,
# :frozen_string_literal=>false,
# :debug_frozen_string_literal=>false,
# :coverage_enabled=>true,
# :debug_level=>0}
//}
@see RubyVM::InstructionSequence.compile_option=... -
Object
:: SCRIPT _ LINES _ _ -> Hash (20208.0) -
ソースファイル別にまとめられたソースコードの各行。
...ガ (debug) などで利用されています。
なお、 $SAFE レベルが 0 でなければ有効にはなりません。
また、 Kernel.#eval によるコンパイルは対象にはなりません。
例:
require 'pp'
SCRIPT_LINES__ = {}
require 'English'
pp SCRIPT_LINES__......local/lib/ruby/1.6/English.rb"=>
# ["alias $ERROR_INFO $!\n",
# "alias $ERROR_POSITION $@\n",
# "alias $LOADED_FEATURES $\"\n",
# :
# :
# "alias $POSTMATCH $'\n",
# "alias $LAS... -
RubyVM
:: InstructionSequence . compile _ option=(options) (20208.0) -
命令シーケンスのコンパイル時のデフォルトの最適化オプションを引数 options で指定します。
...シーケンスのコンパイル時のデフォルトの最適化オプションを引数
options で指定します。
@param options コンパイル時の最適化オプションを true、false、nil、
Hash のいずれかで指定します。true を指定した場合は......nil を指定した場合はいずれ
のオプションも変更しません。また、Hash を指定した
場合は以下のキーに対して、true か false を指定する事で個
別に有効、無効を指定します。
//emlist{
* :inline_c......instructions_unification
* :operands_unification
* :peephole_optimization
* :specialized_instruction
* :stack_caching
* :tailcall_optimization
* :trace_instruction
//}
:debug_level をキーに指定した場合は値を数値で指定します。
.new、.compile、.compi... -
Kernel
. # caller(range) -> [String] | nil (8262.0) -
start 段上の呼び出し元の情報を $@ の形式のバックトレース(文字列の配列)として返します。
...caller の戻り値を $@ に代入することで
例外の発生位置を設定できます。
引数で指定した値が範囲外の場合は nil を返します。
@param start long の範囲を超えない正の整数でスタックレベルを指定します。
@param length 取得するス......ernel.#raise,
Kernel.#caller_locations
//emlist[例][ruby]{
def foo
p caller(0)
p caller(1)
p caller(2)
p caller(3)
p caller(4)
end
def bar
foo
end
bar
#=> ["-:2:in `foo'", "-:10:in `bar'", "-:13:in `<main>'"]
# ["-:10:in `bar'", "-:13:in `<main>'"]
# ["-:13:in `<main>'"]
#......[]
# nil
//}
以下の関数は、caller の要素から [ファイル名, 行番号, メソッド名]
を取り出して返します。
//emlist[例][ruby]{
def parse_caller(at)
if /^(.+?):(\d+)(?::in `(.*)')?/ =~ at
file = $1
line = $2.to_i
method = $3
[file, line, method]... -
Kernel
. # caller(start = 1) -> [String] | nil (8262.0) -
start 段上の呼び出し元の情報を $@ の形式のバックトレース(文字列の配列)として返します。
...caller の戻り値を $@ に代入することで
例外の発生位置を設定できます。
引数で指定した値が範囲外の場合は nil を返します。
@param start long の範囲を超えない正の整数でスタックレベルを指定します。
@param length 取得するス......ernel.#raise,
Kernel.#caller_locations
//emlist[例][ruby]{
def foo
p caller(0)
p caller(1)
p caller(2)
p caller(3)
p caller(4)
end
def bar
foo
end
bar
#=> ["-:2:in `foo'", "-:10:in `bar'", "-:13:in `<main>'"]
# ["-:10:in `bar'", "-:13:in `<main>'"]
# ["-:13:in `<main>'"]
#......[]
# nil
//}
以下の関数は、caller の要素から [ファイル名, 行番号, メソッド名]
を取り出して返します。
//emlist[例][ruby]{
def parse_caller(at)
if /^(.+?):(\d+)(?::in `(.*)')?/ =~ at
file = $1
line = $2.to_i
method = $3
[file, line, method]... -
Kernel
. # caller(start , length) -> [String] | nil (8262.0) -
start 段上の呼び出し元の情報を $@ の形式のバックトレース(文字列の配列)として返します。
...caller の戻り値を $@ に代入することで
例外の発生位置を設定できます。
引数で指定した値が範囲外の場合は nil を返します。
@param start long の範囲を超えない正の整数でスタックレベルを指定します。
@param length 取得するス......ernel.#raise,
Kernel.#caller_locations
//emlist[例][ruby]{
def foo
p caller(0)
p caller(1)
p caller(2)
p caller(3)
p caller(4)
end
def bar
foo
end
bar
#=> ["-:2:in `foo'", "-:10:in `bar'", "-:13:in `<main>'"]
# ["-:10:in `bar'", "-:13:in `<main>'"]
# ["-:13:in `<main>'"]
#......[]
# nil
//}
以下の関数は、caller の要素から [ファイル名, 行番号, メソッド名]
を取り出して返します。
//emlist[例][ruby]{
def parse_caller(at)
if /^(.+?):(\d+)(?::in `(.*)')?/ =~ at
file = $1
line = $2.to_i
method = $3
[file, line, method]... -
GC
:: OPTS -> [String] (8214.0) -
コンパイル時に指定したGCのオプションです。
...* "GC_DEBUG"
* "USE_RGENGC"
* "RGENGC_DEBUG"
* "RGENGC_CHECK_MODE"
* "RGENGC_PROFILE"
* "RGENGC_ESTIMATE_OLDMALLOC"
* "GC_PROFILE_MORE_DETAIL"
* "GC_ENABLE_LAZY_SWEEP"
* "CALC_EXACT_MALLOC_SIZE"
* "MALLOC_ALLOCATED_SIZE"
* "MALLOC_ALLOCATED_SIZE_CHECK"
* "GC_PROFILE_DETAIL_MEMO......RY"
例:
GC::OPTS # => ["USE_RGENGC", "RGENGC_ESTIMATE_OLDMALLOC", "GC_ENABLE_LAZY_SWEEP"]
# この場合、GCデバッグ機能やプロファイル機能は無効化されている...