るりまサーチ

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

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method new
  4. irb/input-method gets
  5. matrix -

種類

ライブラリ

モジュール

検索結果

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

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

...指定しない場合は、
このメソッドは以下と同じです。

//emlist[][ruby]{
$stderr.puts(*message) if !$VERBOSE.nil? && !message.empty?
nil
//}

@param message 出力するオブジェクトを任意個指定します。
@param uplevel いくつ前の呼び出し元のファイル...
... Warning.[] を参照してください。
@raise IOError 標準エラー出力が書き込み用にオープンされていなければ発生します。
@raise Errno::EXXX 出力に失敗した場合に発生します。

//emlist[例][ruby]{
warn
"caution!" #=> caution!
$VERBOSE = nil
warn
"c...
...el の例][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 message", uplevel: 2) # => test message
end
foo
//}

//emlist[category の例][ruby]{
Warn
ing[:deprecated] = true #...

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

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

...指定しない場合は、
このメソッドは以下と同じです。

//emlist[][ruby]{
$stderr.puts(*message) if !$VERBOSE.nil? && !message.empty?
nil
//}

@param message 出力するオブジェクトを任意個指定します。
@param uplevel いくつ前の呼び出し元のファイル...
...[例][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...
...ge", uplevel: 2) # => test message
end
foo
//}


@see Warning#warn, $stderr,$VERBOSE...

Kernel.#warn(*message) -> nil (18225.0)

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

....empty?
nil
//}

@param message 出力するオブジェクトを任意個指定します。
@raise IOError 標準エラー出力が書き込み用にオープンされていなければ発生します。
@raise Errno::EXXX 出力に失敗した場合に発生します。

//emlist[例][ruby]{
warn
...
..."caution!" #=> caution!
$VERBOSE = nil
warn
"caution!" # 何もしない
//}



@see $stderr,$VERBOSE...
..."caution!" #=> caution!
$VERBOSE = nil
warn
"caution!" # 何もしない
//}



@see Warning#warn, $stderr,$VERBOSE...

NEWS for Ruby 3.0.0 (312.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...
...# and deprecation warning
# 3.0 => a=>1}, {}]
//}

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

//emlist{
def method_missing(meth, ...)
send(:"do_#{meth}", ...)
end
//}

* Pattern matching (`case/in`) is no longer experimental. 17260
* One-line pattern match...
...a warning.

== Command line options

=== `--help` option

When the environment variable `RUBY_PAGER` or `PAGER` is present and has
a non-empty value, and the standard input and output are tty, the `--help`
option shows the help message via the pager designated by the value.
16754

=== `--backtrace-l...

Ruby用語集 (144.0)

Ruby用語集 A B C D E F G I J M N O R S Y

...l#percent

: 0 オリジン
: zero-based
番号が 0 から始まること。

例えば、
Array や Vector、Matrix などの要素の番号、
String における文字の位置、
といったものは 0 オリジンである。

: 1 オリジン
: one-based
番号が 1 から始ま...
...っているが、「可変長引数」という用語の
ほうが普及している。

英語の variadic は形容詞である。

: 空
: empty
Array や Hash、Struct のような要素を持つクラスでは、要素が無いことを
「空(から)」と呼ぶ。

また、Str...
..._string_literal)、
インデント不整合の警告を出すかどうかを指定するもの(warn_indent)
がある。

参照:d:spec/m17n#magic_comment

: ミックスイン
: mix-in
モジュールやクラスに対し、他のモジュールの機能を組み込むこと。...

絞り込み条件を変える

NEWS for Ruby 2.5.0 (126.0)

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

...は参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリストは ChangeLog ファイルか bugs.ruby-lang.org の issue を参照してください。

== 2.4.0 以降の変更

=== 言語仕様の変更

* トップレベルの定数参照を削除...
...引数を追加しました 13056
* Dir.chdir (ブロックなしで呼び出した場合), Dir.open, Dir.new, Dir.mkdir, Dir.rmdir,
Dir.empty? はGVLを解放するようになりました
* Dir.children を追加 11302
* Dir.each_child を追加 11302

* Enumerable
* Enume...
...13219

* Kernel
* Object#yield_self を追加 6721
* Kernel.#pp をrequireなしで使えるようにしました 14123
* Kernel.#warn :uplevel というキーワード引数を追加しました 12882

* Method
* Method#=== は Proc#===と同じようにMethod#callを呼び...

NEWS for Ruby 2.0.0 (120.0)

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

...は参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリストは ChangeLog ファイルか bugs.ruby-lang.org の issue を参照してください。

== 1.9.3 以降の変更

=== 言語仕様の変更

* キーワード引数を追加しました...
...化された絶対パ スで返します。
* 追加: Kernel.#caller_locations フレーム情報の配列を返します
* 拡張: Kernel.#warn Kernel.#puts のように複数の引数を受け付けるようになりました
* 拡張: Kernel.#caller 第2引数で取得するスタッ...
...A user-defined callback
may be set which gets called whenever a new handshake is negotiated. This
also allows to programmatically decline (client) renegotiation attempts.
* Support for "0/n" splitting of records as BEAST mitigation via
OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGME...

NEWS for Ruby 2.4.0 (84.0)

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

...は参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリストは ChangeLog ファイルか bugs.ruby-lang.org の issue を参照してください。

== 2.3.0 以降の変更

=== 言語仕様の変更

* 条件式での多重代入ができるよ...
...Enumerable#sum と違って each メソッドに依存しません。

* Comparable
* Comparable#clamp を追加 10594

* Dir
* Dir.empty? を追加 10121

* Enumerable
* Enumerable#chunk ブロックを省略した場合 Enumerator を返すようになりました。2172...
...n_exception を追加 6647

* TracePoint
* TracePoint#callee_id を追加 12747

* Warning
* Warningという名前のモジュールを導入しました。
デフォルトでは Warning.#warn という特異メソッドだけ定義されているモジュールです。
...