156件ヒット
[1-100件を表示]
(0.034秒)
クラス
- Object (12)
-
RubyVM
:: InstructionSequence (24) - Thread (24)
キーワード
-
$ -d (12) -
$ DEBUG (12) - DEBUG (12)
- DEBUG= (12)
- OPTS (12)
-
SCRIPT
_ LINES _ _ (12) - Thread (12)
- caller (36)
-
compile
_ option (12) -
compile
_ option= (12) -
set
_ trace _ func (12)
検索結果
先頭5件
-
Thread
. DEBUG=(val) (6133.0) -
スレッドのデバッグレベルを val に設定します。
...er に変換してから設定します。
偽 のときは 0 を設定します。
使用するためには、THREAD_DEBUG を -1 にして Ruby をコンパイルする必要が
あります。
//emlist[例][ruby]{
Thread.DEBUG # => 0
Thread.DEBUG = 1
Thread.DEBUG # => 1
//}
@see Thread.DEBUG... -
Thread
. DEBUG -> Integer (6121.0) -
スレッドのデバッグレベルを返します。
...れ以外の場合は、スレッドのデバッグログを標準出力に出力します。
初期値は 0 です。
使用するためには、THREAD_DEBUG を -1 にして Ruby をコンパイルする必要が
あります。
//emlist[例][ruby]{
Thread.DEBUG # => 0
//}
@see Thread.DEBUG=... -
Kernel
$ $ DEBUG -> bool (3103.0) -
この値が真のときはインタプリタがデバッグモードになります。
この値が真のときはインタプリタがデバッグモードになります。
コマンドラインオプション -d でセットされます。
スクリプトから代入することもできます。
デバッグモードでは、通常モードに比べて以下の違いがあります。
* 通常時はいずれかのスレッドが例外によって終了しても
他のスレッドは実行を続けますが、デバッグモードでは
いずれかのスレッドが例外によって終了した時に
インタプリタ全体が中断されるようになります。
Thread.abort_on_exception を
true にセットするのと同じ効果です。
* Thread.abort_on_excep... -
Kernel
. # caller(range) -> [String] | nil (50.0) -
start 段上の呼び出し元の情報を $@ の形式のバックトレース(文字列の配列)として返します。
...=> ["-", 15, "bar"]
# ["-", 19, nil]
# nil
//}
以下は、$DEBUG が真の場合に役に立つ debug 関数
のサンプルです。
//emlist[例][ruby]{
$DEBUG = true
def debug(*args)
p [caller.first, *args] if $DEBUG
end
debug "debug information"
#=> ["-:7", "debug information"]
//}... -
Kernel
. # caller(start = 1) -> [String] | nil (50.0) -
start 段上の呼び出し元の情報を $@ の形式のバックトレース(文字列の配列)として返します。
...=> ["-", 15, "bar"]
# ["-", 19, nil]
# nil
//}
以下は、$DEBUG が真の場合に役に立つ debug 関数
のサンプルです。
//emlist[例][ruby]{
$DEBUG = true
def debug(*args)
p [caller.first, *args] if $DEBUG
end
debug "debug information"
#=> ["-:7", "debug information"]
//}... -
Kernel
. # caller(start , length) -> [String] | nil (50.0) -
start 段上の呼び出し元の情報を $@ の形式のバックトレース(文字列の配列)として返します。
...=> ["-", 15, "bar"]
# ["-", 19, nil]
# nil
//}
以下は、$DEBUG が真の場合に役に立つ debug 関数
のサンプルです。
//emlist[例][ruby]{
$DEBUG = true
def debug(*args)
p [caller.first, *args] if $DEBUG
end
debug "debug information"
#=> ["-:7", "debug information"]
//}... -
GC
:: OPTS -> [String] (14.0) -
コンパイル時に指定したGCのオプションです。
...時に指定したGCのオプションです。
可能性があるオプション文字列は以下の通りです。
* "GC_DEBUG"
* "USE_RGENGC"
* "RGENGC_DEBUG"
* "RGENGC_CHECK_MODE"
* "RGENGC_PROFILE"
* "RGENGC_ESTIMATE_OLDMALLOC"
* "GC_PROFILE_MORE_DETAIL"
* "GC_ENABLE_LAZY_SWE... -
RubyVM
:: InstructionSequence . compile _ option -> Hash (14.0) -
命令シーケンスのコンパイル時のデフォルトの最適化オプションを Hash で返 します。
...>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 RubyVM::InstructionSequence.compile_option=... -
Kernel
. # set _ trace _ func(proc) -> Proc (8.0) -
Ruby インタプリタのイベントをトレースする Proc オブジェクトとして 指定された proc を登録します。 nil を指定するとトレースがオフになります。
...発生する度に、以下で説明する6個の引数とともに
登録された Proc オブジェクトを実行します。
標準添付の debug、tracer、
profile はこの組み込み関数を利用して実現されています。
=== ブロックパラメータの意味
渡す Proc オ...