D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
Array
/
Filename :
union-i.ri
back
Copy
U:RDoc::AnyMethod[iI" union:ETI"Array#union;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"EReturns a new array that is the union of the elements of +self+ ;TI"*and all given arrays +other_arrays+; ;TI",items are compared using <tt>eql?</tt>:;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I"F[0, 1, 2, 3].union([4, 5], [6, 7]) # => [0, 1, 2, 3, 4, 5, 6, 7] ;T:@format0o; ; [I"5Removes duplicates (preserving the first found):;T@o;; [I"7[0, 1, 1].union([2, 1], [3, 1]) # => [0, 1, 2, 3] ;T; 0o; ; [I"BPreserves order (preserving the position of the first found):;T@o;; [I"@[3, 2, 1, 0].union([5, 3], [4, 2]) # => [3, 2, 1, 0, 5, 4] ;T; 0o; ; [I"7With no arguments given, returns a copy of +self+.;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"'union(*other_arrays) -> new_array ;T0[ I"(*args);T@&FI" Array;TcRDoc::NormalClass00