るりまサーチ

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

別のキーワード

  1. set intersect?
  2. _builtin intersect?
  3. array intersect?
  4. intersect? set
  5. intersect_fds

ライブラリ

クラス

検索結果

Set#intersect?(set) -> bool (18118.0)

self と set の共通要素がある場合に true を返します。

...返します。

@
param self Set オブジェクトを指定します。
@
raise ArgumentError 引数が Set オブジェクトでない場合に発生します。

require 'set'
p Set[1, 2, 3].intersect?(Set[3, 4]) # => true
p Set[1, 2, 3].intersect?(Set[4, 5]) # => false

@
see Set#intersect...
...true を返します。

@
param self Set オブジェクトを指定します。
@
raise ArgumentError 引数が Set オブジェクトでない場合に発生します。

p Set[1, 2, 3].intersect?(Set[3, 4]) # => true
p Set[1, 2, 3].intersect?(Set[4, 5]) # => false

@
see Set#intersection, Se...