最速Rubyリファレンスマニュアル検索!
すべて(4)
3.1(1)
3.2(1)
3.3(1)
3.4(1)
4件ヒット
[1-4件を表示]
(0.014秒)
トップページ
>
:
intersect?
>
クラス:Array
別のキーワード
set intersect?
_builtin intersect?
array intersect?
intersect? set
intersect_fds
ライブラリ
ビルトイン
(4)
検索結果
先頭1件
Array
#
intersect?(other) -> bool
Array
#
intersect?(other) -> bool
(18101.0)
3.1
3.2
3.3
3.4
インスタンスメソッド
other と共通の要素が少なくとも1個あれば true を、なければ false を返します。
...
other と共通の要素が少なくとも1個あれば true を、なければ false を返します。
//emlist[例][ruby]{
a = [ 1, 2, 3 ]
b = [ 3, 4, 5 ]
c = [ 5, 6, 7 ]
a.
intersect?
(b) # => true
a.
intersect?
(c) # => false
//}
...