るりまサーチ

最速Rubyリファレンスマニュアル検索!
55件ヒット [1-55件を表示] (0.026秒)
トップページ > モジュール:Kernel[x] > クエリ:kernel[x] > クエリ:$[x] > クエリ:$DEBUG[x]

別のキーワード

  1. kernel $kcode
  2. kernel $safe
  3. kernel $10
  4. kernel $4
  5. kernel $stdout

種類

ライブラリ

キーワード

検索結果

Kernel$$DEBUG -> bool (30203.0)

この値が真のときはインタプリタがデバッグモードになります。

....abort_on_exception= の効果がなくなります。
* 例外を捕捉しているかどうかに関係なく、
例外が発生した時点で $stderr にそれが出力されます。
スクリプトの処理は続行されます。

この変数はグローバルスコープです。

@s...

Kernel$$-d -> bool (15103.0)

この値が真のときはインタプリタがデバッグモードになります。

....abort_on_exception= の効果がなくなります。
* 例外を捕捉しているかどうかに関係なく、
例外が発生した時点で $stderr にそれが出力されます。
スクリプトの処理は続行されます。

この変数はグローバルスコープです。

@s...

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

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

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

トップレベルでは空の配列を返します。caller の戻り値を $@ に代入することで
例外の発生位置を設定できます。

引数で指定した...
...します。

@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)
end

de...
...at
file = $1
line = $2.to_i
method = $3
[file, line, method]
end
end

def foo
p parse_caller(caller.first)
end

def bar
foo
p parse_caller(caller.first)
end

bar
p parse_caller(caller.first)

#=> ["-", 15, "bar"]
# ["-", 19, nil]
# nil
//}

以下は、$DEBUG が真の場...

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

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

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

トップレベルでは空の配列を返します。caller の戻り値を $@ に代入することで
例外の発生位置を設定できます。

引数で指定した...
...します。

@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)
end

de...
...at
file = $1
line = $2.to_i
method = $3
[file, line, method]
end
end

def foo
p parse_caller(caller.first)
end

def bar
foo
p parse_caller(caller.first)
end

bar
p parse_caller(caller.first)

#=> ["-", 15, "bar"]
# ["-", 19, nil]
# nil
//}

以下は、$DEBUG が真の場...

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

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

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

トップレベルでは空の配列を返します。caller の戻り値を $@ に代入することで
例外の発生位置を設定できます。

引数で指定した...
...します。

@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)
end

de...
...at
file = $1
line = $2.to_i
method = $3
[file, line, method]
end
end

def foo
p parse_caller(caller.first)
end

def bar
foo
p parse_caller(caller.first)
end

bar
p parse_caller(caller.first)

#=> ["-", 15, "bar"]
# ["-", 19, nil]
# nil
//}

以下は、$DEBUG が真の場...

絞り込み条件を変える