るりまサーチ

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

別のキーワード

  1. openssl p
  2. openssl p=
  3. fileutils mkdir_p
  4. dh p
  5. dh p=

ライブラリ

クラス

モジュール

検索結果

File.zero?(path) -> bool (18206.0)

FileTest.#zero? と同じです。

...FileTest.#zero? と同じです。

@param path パスを表す文字列か IO オブジェクトを指定します。...

FileTest.#zero?(file) -> bool (18124.0)

ファイルが存在して、そのサイズが 0 である時に真を返します。 そうでない場合、あるいはシステムコールに失敗した場合には false を返します。

...します。

@param file ファイル名を表す文字列か IO オブジェクトを指定します。

@raise IOError 指定された IO オブジェクト file が既に close されていた場合に発生します。

//emlist[例:][ruby]{
IO
.write("zero.txt", "")
FileTest.zero?("zero.txt")...
...# => true
IO.write("nonzero.txt", "1")
FileTest.zero?("nonzero.txt") # => false
//}

@see FileTest.#size, FileTest.#size?...

NEWS for Ruby 3.0.0 (126.0)

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

...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 longer
subject to autosplatting. This now matches the behavior of Pro...
...cepting a single rest argument and no keywords.
16166

//emlist[][ruby]{
p
r = proc{|*a, **kw| [a, kw]}

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

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

* Arguments forwarding (`...`) now suppo...
...closed pipe, no broken pipe error message will be shown now. 14413
* `TRUE`/`FALSE`/`NIL` constants are no longer defined.
* Integer#zero? overrides Numeric#zero? for optimization. 16961
* Enumerable#grep and Enumerable#grep_v when passed a Regexp and no block no longer modify Regexp.last_m...