るりまサーチ (Ruby 3.2)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.103秒)

別のキーワード

  1. time sec
  2. datetime sec
  3. date sec
  4. _builtin sec
  5. time tv_sec

ライブラリ

検索結果

Array#intersect?(other) -> bool (72607.0)

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
//}