1件ヒット
[1-1件を表示]
(0.061秒)
クラス
- Hash (1)
検索結果
-
Hash
# replace(other) -> self (81844.0) -
ハッシュの内容を other の内容で置き換えます。
ハッシュの内容を other の内容で置き換えます。
デフォルト値の設定もotherの内容になります。
otherがハッシュではない場合、otherのメソッドto_hashを使って暗黙の変換を試みます。
self = other.to_hash.dup と同じです。
@param other ハッシュまたはメソッド to_hash でハッシュに変換できるオブジェクトです。
@return self を返します。
//emlist[例][ruby]{
foo = {1 => 'a', 2 => 'b'}
bar = {2 => 'B', 3 => 'C'}
foo.replace(b...