るりまサーチ

最速Rubyリファレンスマニュアル検索!
319件ヒット [1-100件を表示] (0.051秒)
トップページ > クエリ:to[x] > クエリ:debug[x]

別のキーワード

  1. _builtin to_s
  2. openssl to_der
  3. openssl to_s
  4. _builtin to_a
  5. openssl to_pem

検索結果

<< 1 2 3 ... > >>

WEBrick::BasicLog#debug(msg) -> () (18139.0)

ログレベル DEBUG で文字列 msg をログに記録します。 自身の level が DEBUG より重要度が高い場合には記録しません。

...ログレベル DEBUG で文字列 msg をログに記録します。
自身の level が DEBUG より重要度が高い場合には記録しません。

行頭に level を表す文字列が追加されます。
msg の終端が "\n" でない場合には "\n" を追加します。

@param msg...
...記録したい文字列を指定します。文字列でない場合は to_s メソッドで文字列に変換します。...

VALUE rb_ary_to_s(VALUE ary) (6128.0)

ary.to_s

...ary.to_s

使用例

void debug_print(VALUE ary)
{
Check_Type(ary, T_ARRAY);
printf("%s", STR2CSTR(rb_ary_to_s(ary)));
}...

GetoptLong#set_options(*arguments) -> self (3018.0)

あなたのプログラムで、認識させたいオプションをセットします。 個々のオプションは、オプション名と引数のフラグからなる配列でな ければいけません。

...ン (例: --debug) を表した文字列のいずれかでなければなり
ません。配列の中の一番左端のオプション名が、オプションの正式名
になります。配列中の引数のフラグは、GetoptLong::NO_ARGUMENT,
GetoptLong::REQUIRE_ARGUMENT, GetoptLong::OPTIONAL...
...えられるた場合、発生します。

parser.set_options(['-d', '--debug', GetoptLong::NO_ARGUMENT],
['--version', GetoptLong::NO_ARGUMENT],
['--help', GetoptLong::NO_ARGUMENT])

オプション名と引数のフラグの順番に決...
...まりはないので、次のような
形式でも構いません。

parser.set_options([GetoptLong::NO_ARGUMENT, '-d', '--debug'],
[GetoptLong::NO_ARGUMENT, '--version'],
[GetoptLong::NO_ARGUMENT, '--help'])...

NEWS for Ruby 3.0.0 (324.0)

NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...ill now
result in ArgumentError or different behavior. 14183
* Procs accepting a single rest argument and keywords are no longer
subject to autosplatting. This now matches the behavior of Procs
accepting a single rest argument and no keywords.
16166

//emlist[][ruby]{
pr = proc{|*...
...matching is redesigned. [EXPERIMENTAL]
* `=>` is added. It can be used like a rightward assignment.
17260
* `in` is changed to return `true` or `false`. 17371

//emlist{
0 => a
p a #=> 0

{b: 0, c: 1} => {b:}
p b #=> 0
//}

//emlist{
# version 3.0
0 in 1 #=> false

# versio...
...fault gems
* The following libraries are promoted to default gems from stdlib.
* English
* abbrev
* base64
* drb
* debug
* erb
* find
* net-ftp
* net-http
* net-imap
* net-protocol
* open-uri
* optparse
* pp...

logger (66.0)

ログを記録するためのライブラリです。

...ムをクラッシュさせるような制御不可能なエラー
: ERROR
制御可能なエラー
: WARN
警告
: INFO
一般的な情報
: DEBUG
低レベルの情報

全てのメッセージは必ずログレベルを持ちます。また Logger オブジェクトも同じように
...
...クトのログレベルを DEBUG に下げるなどという使い方をします。

==== 例

//emlist[][ruby]{
require 'logger'
logger = Logger.new(STDOUT)
logger.level = Logger::WARN

logger.debug("Created logger")
logger.info("Program started")
logger.warn("Nothing to do!")

path = "a_non_exis...
...です。

W, [2017-12-07T02:22:53.649000 #11601] WARN -- : Nothing to do!
F, [2017-12-07T02:22:53.649172 #11601] FATAL -- : Caught exception; exiting
F, [2017-12-07T02:22:53.649222 #11601] FATAL -- : No such file or directory @ rb_sysopen - a_non_existent_file (Errno::ENOENT)
logger_sample...

絞り込み条件を変える

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

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

...$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 が真の場合に役に立つ 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 (54.0)

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

...$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 が真の場合に役に立つ 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 (54.0)

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

...$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 が真の場合に役に立つ debug...
...関数
のサンプルです。

//emlist[例][ruby]{
$DEBUG = true

def debug(*args)
p [caller.first, *args] if $DEBUG
end

debug
"debug information"

#=> ["-:7", "debug information"]
//}...

irb (54.0)

irb は Interactive Ruby の略です。 irb を使うと、Ruby の式を標準入力から簡単に入力・実行することができます。

...ns:
-f ~/.irbrc を読み込まない
-m bc モード (分数と行列の計算ができる)
-d $DEBUG を true にする (ruby -d と同じ)
-w ruby -w と同じ
-W[level=2] ruby -W と同じ
-r library ruby -r と...
...参照)
--single-irb irb 中で self を実行して得られるオブジェクトをサブ irb と共
有する
--irb_debug n irb のデバッグレベルを n に設定する
(ユーザは利用すべきではない)
-v, --version irb の...
...を指定したのと同じ効果が得られます。

IRB.conf[:AUTO_INDENT] = false
IRB.conf[:BACK_TRACE_LIMIT] = 16
IRB.conf[:DEBUG_LEVEL] = 1
IRB.conf[:ECHO] = nil
IRB.conf[:EVAL_HISTORY] = nil
IRB.conf[:HISTORY_FILE] = nil
IRB.conf[:IGNORE_EOF] = true
IRB.conf[:IGNORE_SIGINT] =...
...ンドラインオプション

irb [options] file_name opts
options:
-f ~/.irbrc を読み込まない
-d $DEBUG を true にする (ruby -d と同じ)
-w ruby -w と同じ
-W[level=2] ruby -W と同じ
-r library ruby -r と...
<< 1 2 3 ... > >>