26件ヒット
[1-26件を表示]
(0.044秒)
別のキーワード
検索結果
先頭5件
-
FileTest
. # zero?(file) -> bool (18148.0) -
ファイルが存在して、そのサイズが 0 である時に真を返します。 そうでない場合、あるいはシステムコールに失敗した場合には false を返します。
...か IO オブジェクトを指定します。
@raise IOError 指定された IO オブジェクト file が既に close されていた場合に発生します。
//emlist[例:][ruby]{
IO.write("zero.txt", "")
FileTest.zero?("zero.txt") # => true
IO.write("nonzero.txt", "1")
FileTest.zero?("... -
File
. zero?(path) -> bool (18112.0) -
FileTest.#zero? と同じです。
...FileTest.#zero? と同じです。
@param path パスを表す文字列か IO オブジェクトを指定します。... -
FileTest
. # zero?(file) -> bool (15148.0) -
ファイルが存在して、そのサイズが 0 である時に真を返します。 そうでない場合、あるいはシステムコールに失敗した場合には false を返します。
...か IO オブジェクトを指定します。
@raise IOError 指定された IO オブジェクト file が既に close されていた場合に発生します。
//emlist[例:][ruby]{
IO.write("zero.txt", "")
FileTest.zero?("zero.txt") # => true
IO.write("nonzero.txt", "1")
FileTest.zero?("... -
File
. zero?(path) -> bool (15112.0) -
FileTest.#zero? と同じです。
...FileTest.#zero? と同じです。
@param path パスを表す文字列か IO オブジェクトを指定します。... -
NEWS for Ruby 3
. 0 . 0 (156.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...ated 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 Procs......by]{
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, .........`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
# version 2.7
0 in 1 #=> raise NoMatchingPatternError
//}
* Find-pattern is added. [EXPERIMENTAL]
16828
//emlist{
case ["a", 1, "b",...