55件ヒット
[1-55件を表示]
(0.065秒)
検索結果
先頭5件
-
Kernel
$ $ DEBUG -> bool (23103.0) -
この値が真のときはインタプリタがデバッグモードになります。
この値が真のときはインタプリタがデバッグモードになります。
コマンドラインオプション -d でセットされます。
スクリプトから代入することもできます。
デバッグモードでは、通常モードに比べて以下の違いがあります。
* 通常時はいずれかのスレッドが例外によって終了しても
他のスレッドは実行を続けますが、デバッグモードでは
いずれかのスレッドが例外によって終了した時に
インタプリタ全体が中断されるようになります。
Thread.abort_on_exception を
true にセットするのと同じ効果です。
* Thread.abort_on_excep... -
Kernel
. # caller(range) -> [String] | nil (8014.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 (8014.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 (8014.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
$ $ -d -> bool (8003.0) -
この値が真のときはインタプリタがデバッグモードになります。
この値が真のときはインタプリタがデバッグモードになります。
コマンドラインオプション -d でセットされます。
スクリプトから代入することもできます。
デバッグモードでは、通常モードに比べて以下の違いがあります。
* 通常時はいずれかのスレッドが例外によって終了しても
他のスレッドは実行を続けますが、デバッグモードでは
いずれかのスレッドが例外によって終了した時に
インタプリタ全体が中断されるようになります。
Thread.abort_on_exception を
true にセットするのと同じ効果です。
* Thread.abort_on_excep...