るりまサーチ

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

別のキーワード

  1. _builtin empty?
  2. csv empty?
  3. dbm empty?
  4. sdbm empty?
  5. gdbm empty?

種類

ライブラリ

モジュール

検索結果

Kernel.#warn(*message, uplevel: nil, category: nil) -> nil (18155.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 (18143.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 (18125.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 2.4.0 (24.0)

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

...Enumerable#sum と違って each メソッドに依存しません。

* Comparable
* Comparable#clamp を追加 10594

* Dir
* Dir.empty? を追加 10121

* Enumerable
* Enumerable#chunk ブロックを省略した場合 Enumerator を返すようになりました。2172...
...* Enumerator::Lazy#chunk_while を追加 https://github.com/ruby/ruby/pull/1186
* Enumerator::Lazy#uniq を追加 11090

* File
* File.empty? を追加 9969

* Float
* Float#ceil, Float#floor, Float#truncate は
Float#roundと同じように省略可能な桁を指定する...
...n_exception を追加 6647

* TracePoint
* TracePoint#callee_id を追加 12747

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

NEWS for Ruby 2.0.0 (18.0)

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

...化された絶対パ スで返します。
* 追加: Kernel.#caller_locations フレーム情報の配列を返します
* 拡張: Kernel.#warn Kernel.#puts のように複数の引数を受け付けるようになりました
* 拡張: Kernel.#caller 第2引数で取得するスタッ...
...ing of records as BEAST mitigation via
OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS.
* The default options for OpenSSL::SSL::SSLContext have changed to
OpenSSL::SSL::OP_ALL & ~OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS
instead of OpenSSL::SSL::OP_ALL only. This enables the co...

絞り込み条件を変える

NEWS for Ruby 3.0.0 (18.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, ...)...
...4541
* Assigning to a numbered parameter is now a SyntaxError instead of
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 th...

Ruby用語集 (18.0)

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

...っているが、「可変長引数」という用語の
ほうが普及している。

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

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

また、Str...
...は、長さが 0 のインスタンスを「空文字列」と呼ぶ。

空であることを確認するメソッドの名前にしばしば empty? が使われる。

: 仮引数
: formal argument
メソッド定義において、メソッド呼び出しで与えられた実引数を
...
...るかどうかを指定するもの(frozen_string_literal)、
インデント不整合の警告を出すかどうかを指定するもの(warn_indent)
がある。

参照:d:spec/m17n#magic_comment

: ミックスイン
: mix-in
モジュールやクラスに対し、他のモジ...

NEWS for Ruby 2.5.0 (12.0)

NEWS for Ruby 2.5.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を呼び...