るりまサーチ

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

別のキーワード

  1. _builtin hash
  2. hash []
  3. matrix hash
  4. dbm to_hash
  5. _builtin to_hash

ライブラリ

クラス

キーワード

検索結果

Array#union(*other_arrays) -> Array (18125.0)

集合の和演算です。self と other_arrays の配列にどれかに含まれる要素を 全て含む新しい配列を返します。重複する要素は取り除かれます。

...#eql? と Object#hash により行われます。

@param other_arrays 0個以上の配列を指定します。

//emlist[例][ruby]{
["a", "b", "c"].union([ "c", "d", "a" ]) #=> ["a", "b", "c", "d"]
["a"].union(["e", "b"], ["a", "c", "b"]) #=> ["a", "e", "b", "c"]
["a"].union # => ["a"]
//}...

NEWS for Ruby 2.6.0 (72.0)

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

...リップフロップが非推奨になりました。 5400

=== 組み込みクラスの更新

* Array
* 新規メソッド
* Array#union と Array#difference 14097
* 変更されたメソッド
* Array#to_h はブロックを受け取りキーと値のペアを新しいキ...
...と :order を受け付けるようになりました。 14324

* Hash
* 変更されたメソッド
* Hash#merge, Hash#merge!, Hash#update が引数を複数受け付けるようになりました。 15111
* Hash#to_h はブロックを受け取りキーと値のペアを新し...
...いキーと値に変換できるようになりました。 15143
* 別名
* Hash#filter が Hash#select の別名として追加されました。 13784
* Hash#filter! が Hash#select! の別名として追加されました。 13784

* IO
* 新規オプション
* 排...

NEWS for Ruby 3.0.0 (72.0)

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

...ob and Dir.[] now sort the results by default, and accept the `sort:` keyword option. 8709
* ENV
* ENV.except has been added, which returns a hash excluding the given keys and their values. 15822
* Windows: Read ENV names and values as UTF-8 encoded Strings 12650
* Encoding
* Added...
...cant overhead to major collections, so please test first! 17176
* Hash
* Hash#transform_keys and Hash#transform_keys! now accept a hash that maps keys to new keys. 16274
* Hash#except has been added, which returns a hash excluding the given keys and their values. 15822
* IO
* IO#n...
...= RBS

* RBS is a new language for type definition of Ruby programs. It allows writing types of classes and modules with advanced types including union types, overloading, generics, and _interface types_ for duck typing.
* Ruby ships with type definitions for core/stdlib classes.
* `rbs` gem i...

Array#|(other) -> Array (12.0)

集合の和演算です。両方の配列にいずれかに含まれる要素を全て含む新し い配列を返します。重複する要素は取り除かれます。

...を全て含む新し
い配列を返します。重複する要素は取り除かれます。

要素の重複判定は、Object#eql? と Object#hash により行われます。

新しい配列における要素の順は self における要素の順と同じです。

@param other 配列を指定...
...暗黙の型変換を試みます。

@raise TypeError 引数に配列以外の(暗黙の型変換が行えない)オブジェクトを
指定した場合に発生します。

//emlist[例][ruby]{
[1, 1, 4, 2, 3] | [5, 4, 5] #=> [1, 4, 2, 3, 5]
//}

@see Array#&
@see Array#union...