るりまサーチ

最速Rubyリファレンスマニュアル検索!
269件ヒット [1-100件を表示] (0.032秒)

別のキーワード

  1. kernel exec
  2. kernel spawn
  3. kernel system
  4. kernel open
  5. kernel gsub

ライブラリ

クラス

モジュール

検索結果

<< 1 2 3 > >>

Syslog.#debug(message, *arg) -> self (15107.0)

Syslog#log()のショートカットメソッド。 システムによっては定義されていないものもあります。

...log.emerg(message, *arg) は、Syslog.log(Syslog::LOG_EMERG, message, *arg)
と同じです。

@param message フォーマット文字列です。Kernel.#sprintf と同じ形式の引数を指定します。

@param arg フォーマットされる引数です。

@raise ArgumentError 引数が1つ...

Kernel$$DEBUG -> bool (12101.0)

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

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

コマンドラインオプション -d でセットされます。
スクリプトから代入することもできます。

デバッグモードでは、通常モードに比べて以下の違いがあります。

* 通常時はいずれかのスレッドが例外によって終了しても
他のスレッドは実行を続けますが、デバッグモードでは
いずれかのスレッドが例外によって終了した時に
インタプリタ全体が中断されるようになります。
Thread.abort_on_exception を
true にセットするのと同じ効果です。
* Thread.abort_on_excep...

Kernel.#caller(range) -> [String] | nil (9066.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)
end

de...
...=> ["-", 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 (9066.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)
end

de...
...=> ["-", 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 (9066.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)
end

de...
...=> ["-", 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#enable_config(config, default) -> bool | String (9018.0)

configure のオプションを検査します。

...義を、追加するのに役立ちます。

@param config configure のオプションの名前を指定します。

@param default デフォルト値を返します。


require 'mkmf'
if enable_config("debug")
$defs.push("-DOSSL_DEBUG") unless $defs.include? "-DOSSL_DEBUG"
end...

Kernel#enable_config(config, default) {|config, default| ... } -> bool | String (9018.0)

configure のオプションを検査します。

...義を、追加するのに役立ちます。

@param config configure のオプションの名前を指定します。

@param default デフォルト値を返します。


require 'mkmf'
if enable_config("debug")
$defs.push("-DOSSL_DEBUG") unless $defs.include? "-DOSSL_DEBUG"
end...

Kernel#with_config(config, default = nil) -> bool | String (9018.0)

configure のオプションを検査します。

...定義を、追加するのに役立ちます。

@param config configure のオプションの名前を指定します。

@param default デフォルト値を返します。


require 'mkmf'
if with_config("debug")
$defs.push("-DOSSL_DEBUG") unless $defs.include? "-DOSSL_DEBUG"
end...

Kernel#with_config(config, default = nil) {|config, default| ... } -> bool | String (9018.0)

configure のオプションを検査します。

...定義を、追加するのに役立ちます。

@param config configure のオプションの名前を指定します。

@param default デフォルト値を返します。


require 'mkmf'
if with_config("debug")
$defs.push("-DOSSL_DEBUG") unless $defs.include? "-DOSSL_DEBUG"
end...

Kernel.#set_trace_func(proc) -> Proc (9018.0)

Ruby インタプリタのイベントをトレースする Proc オブジェクトとして 指定された proc を登録します。 nil を指定するとトレースがオフになります。

...発生する度に、以下で説明する6個の引数とともに
登録された Proc オブジェクトを実行します。

標準添付の debug、tracer、
profile はこの組み込み関数を利用して実現されています。

=== ブロックパラメータの意味

渡す Proc オ...
...uby]{
set_trace_func lambda {|*arg|
p arg
}
class Foo
end
43.to_s

# ----結果----
# ["c-return", "..", 1, :set_trace_func, #<Binding:0xf6ceb8>, Kernel]
# ["line", "..", 4, nil, #<Binding:0x10cbcd8>, nil]
# ["c-call", "..", 4, :inherited, #<Binding:0x10cba98>, Class]
# ["c-return", "..", 4, :inhe...
...["class", "..", 4, nil, #<Binding:0x10cb600>, nil]
# ["end", "..", 5, nil, #<Binding:0x10cb3f0>, nil]
# ["line", "..", 6, nil, #<Binding:0x10cb1e0>, nil]
# ["c-call", "..", 6, :to_s, #<Binding:0x10cafd0>, Fixnum]
# ["c-return", "..", 6, :to_s, #<Binding:0x10cad78>, Fixnum]
//}

@see Kernel.#caller...

絞り込み条件を変える

<< 1 2 3 > >>