21件ヒット
[1-21件を表示]
(0.021秒)
種類
- インスタンスメソッド (17)
- 文書 (4)
ライブラリ
- ビルトイン (11)
-
shell
/ command-processor (6)
クラス
- Hash (11)
-
Shell
:: CommandProcessor (6)
キーワード
-
NEWS for Ruby 3
. 0 . 0 (4) -
default
_ proc= (11)
検索結果
-
Shell
:: CommandProcessor # zero?(file) -> bool (21100.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
...FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#zero?... -
Hash
# default _ proc=(pr) (6195.0) -
ハッシュのデフォルト値を返す Proc オブジェクトを 変更します。
...ハッシュのデフォルト値を返す Proc オブジェクトを
変更します。
以前のデフォルトは値(Hash#default)の場合も
Proc の場合(Hash#default_proc)でも上書きされます。
引数には to_proc で Proc オブジェクトに変換できる
オブジェクト......sh#default_proc をクリアします。
@param pr デフォルト値を返す手続きオブジェクト
//emlist[例][ruby]{
h = {}
h.default_proc = proc do |hash, key|
hash[key] = case
when (key % 15).zero?
"FizzBuzz"
when (key % 5).zero?......"
when (key % 3).zero?
"Fizz"
else
key
end
end
p h[1] # => 1
p h[2] # => 2
p h[3] # => "Fizz"
p h[5] # => "Buzz"
p h[15] # => "FizzBuzz"
h.default_proc = nil
p h[16] # => nil
# default_proc が nil になったので `1... -
NEWS for Ruby 3
. 0 . 0 (54.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...ror 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
accepting a single rest argument and no keywords.
16166
//emlist[][ruby]{
pr = proc{|*a, **kw| [a, kw]}
pr.call([1])......be compatible for essentially all usages and avoids blocking when using a scheduler. 16792
* Proc
* Proc#== and Proc#eql? are now defined and will return true for separate Proc instances if the procs were created from the same block. 14267
* Queue / SizedQueue
* Queue#pop, SizedQueue#pu......osed 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_matc...