D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
Array
/
Filename :
intersection-i.ri
back
Copy
U:RDoc::AnyMethod[iI"intersection:ETI"Array#intersection;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"KReturns a new array containing each element in +self+ that is +#eql?+ ;TI"Bto at least one element in each of the given +other_arrays+; ;TI"duplicates are omitted:;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I"G[0, 0, 1, 1, 2, 3].intersection([0, 1, 2], [0, 1, 3]) # => [0, 1] ;T:@format0o; ; [I"AEach element must correctly implement method <tt>#hash</tt>.;T@o; ; [I"$Order from +self+ is preserved:;T@o;; [I"6[0, 1, 2].intersection([2, 1, 0]) # => [0, 1, 2] ;T; 0o; ; [I"8Returns a copy of +self+ if no arguments are given.;T@o; ; [I"PRelated: see {Methods for Combining}[rdoc-ref:Array@Methods+for+Combining].;T: @fileI"array.c;T:0@omit_headings_from_table_of_contents_below0I".intersection(*other_arrays) -> new_array ;T0[ I"(*args);T@#FI" Array;TcRDoc::NormalClass00