るりまサーチ

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

別のキーワード

  1. rss category
  2. rss category=
  3. rss new_category
  4. category domain
  5. category domain=

ライブラリ

モジュール

キーワード

検索結果

Warning.warn(message, category: nil) -> nil (21262.0)

引数 message を標準エラー出力 $stderr に出力します。

...st[][ruby]{
module Warning
# 警告メッセージに category を表示し、message 末尾に !!! を追加する
def self.warn(message, category: nil)
super("#{category} warning : #{message.chomp}!!!\n")
end
end

warn
("hoge", category: :deprecated)
# => deprecated warning : hoge!!!
//}...
...@param message 出力するオブジェクトを指定します。

@param category 警告のカテゴリを指定します。サポートされている category については Warning.[] を参照してください。

@see Kernel.#warn, Warning#warn...

Warning#warn(message, category: nil) -> nil (21238.0)

引数 message を標準エラー出力 $stderr に出力します。

...力します。

Kernel.#warnの挙動を変更する際は、このメソッドではなくクラスメソッドであるWarning.warnをオーバーライドする必要があります。

@param message 出力するオブジェクトを指定します。

@param category 警告のカテゴリを...
...指定します。サポートされている category については Warning.[] を参照してください。


@see Kernel.#warn, Warning.warn...

Warning.warn(message) -> nil (21143.0)

引数 message を標準エラー出力 $stderr に出力します。

...t[][ruby]{
warn
"hoge" # => hoge

module Warning
# 警告メッセージの末尾に !!! を追加する
def self.warn(message)
super(message.chomp + "!!!\n")
end
end

warn
"hoge" # => hoge!!!
//}

@param message 出力するオブジェクトを指定します。

@param category 警告...
...のカテゴリを指定します。サポートされている category については Warning.[] を参照してください。

@see Kernel.#warn, Warning#warn...

Warning#warn(message) -> nil (21137.0)

引数 message を標準エラー出力 $stderr に出力します。

...力します。

Kernel.#warnの挙動を変更する際は、このメソッドではなくクラスメソッドであるWarning.warnをオーバーライドする必要があります。

@param message 出力するオブジェクトを指定します。

@param category 警告のカテゴリを...
...指定します。サポートされている category については Warning.[] を参照してください。


@see Kernel.#warn, Warning.warn...

Kernel.#warn(*message, uplevel: nil, category: nil) -> nil (18280.0)

message を 標準エラー出力 $stderr に出力します。 $VERBOSE フラグ が nil のときは何も出力しません。

...するかを0以上の数値で指定します。 nil の場合は表示しません。
@param category 警告のカテゴリを指定します。サポートされている category については Warning.[] を参照してください。
@raise IOError 標準エラー出力が書き込み用に...
...[例][ruby]{
warn
"caution!" #=> caution!
$VERBOSE = nil
warn
"caution!" # 何もしない
//}

//emlist[uplevel の例][ruby]{
def foo
warn
("test message", uplevel: 0) # => test.rb:2: warning: test message
warn
("test message", uplevel: 1) # => test.rb:6: warning: test message
warn
("test messa...
...sage
end
foo
//}

//emlist[category の例][ruby]{
Warn
ing[:deprecated] = true # 非推奨の警告を表示する
warn
("deprecated!!", category: :deprecated)
# => deprecated!

Warn
ing[:deprecated] = false # 非推奨の警告を表示しない
warn
("deprecated!!", category: :deprecated)
# 警告は...

絞り込み条件を変える

Warning.[]=(category, flag) -> flag (3139.0)

category の警告を表示するかどうかのフラグを設定します。 サポートされている category については Warning.[] を参照してください。

...
category
の警告を表示するかどうかのフラグを設定します。
サポートされている category については Warning.[] を参照してください。

@param category 警告の種類を指定します。
@param flag 真、または偽を指定します。

@see Warning.[]...

Warning.[](category) -> bool (3119.0)

...

category
の種類の警告を表示するかどうかのフラグを返します。

@param category 警告の種類を指定します。

サポートされている category は以下の通りです。

: :deprecated
非推奨の警告。
例: nil ではない値を $, や $; に設定す...

NEWS for Ruby 3.0.0 (12.0)

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

...ください。

== 言語仕様の変更

* Keyword arguments are now separated from positional arguments.
Code that resulted in deprecation warnings in Ruby 2.7 will now
result in ArgumentError or different behavior. 14183
* Procs accepting a single rest argument and keywords are no lo...
...pr = proc{|*a, **kw| [a, kw]}

pr.call([1])
# 2.7 => [[1], {}]
# 3.0 => [[[1]], {}]

pr.call([1, {a: 1}])
# 2.7 => [[1], {:a=>1}] # and deprecation warning
# 3.0 => a=>1}, {}]
//}

* Arguments forwarding (`...`) now supports leading arguments.
16378

//emlist{
def method_missing(meth, ...)...
...has been added for disabling the default deadlock detection, allowing the use of signal handlers to break deadlock. 13768
* Warning
* Warning#warn now supports a category keyword argument. 17122

== Stdlib updates

Outstanding ones only.

* BigDecimal
* Update to BigDecimal 3.0.0
* T...