Courses
Tutorials
Practice
Data Structure
Java
Python
HTML
Interview Preparation
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Similar Topics
Web Technologies
37.3K+ articles
DSA
22.5K+ articles
Python
20.5K+ articles
Experiences
16.6K+ articles
Interview Experiences
14.1K+ articles
JavaScript
11.6K+ articles
School Learning
11.4K+ articles
Ruby
1.2K+ articles
Ruby-Methods
926+ articles
Ruby Collections
144+ articles
Ruby Array-class
99 posts
Recent Articles
Popular Articles
Ruby | Array &() function
Last Updated: 05 December 2019
Array#() : () is an Array class method which returns a new array containing unique elements common to the two arrays.Syntax: Array.()Parameter: Array for the comparison Re...
read more
Ruby
Ruby-Methods
Ruby Array-class
Ruby | Array <=> function
Last Updated: 05 December 2019
Array#() : () is an Array class method which performs the comparison between the two arrays. Syntax: Array.()Parameter: Array for the comparison Return: 1 : if a b-1 : i...
read more
Ruby
Ruby-Methods
Ruby Array-class
Ruby | Array repeated_permutation() function
Last Updated: 05 December 2019
Array#repeated_permutation() : repeated_permutation() is a Array class method which returns all repeated permutations of length n of the elements of the array, then return...
read more
Ruby
Ruby-Methods
Ruby Array-class
Ruby | Array to_h() function
Last Updated: 05 December 2019
Array#to_h() : to_h() is a Array class method which returns the result of interpreting ary as an array of [key, value] pairs.Syntax: Array.to_h()Parameter: ArrayReturn: th...
read more
Ruby
Ruby-Methods
Ruby Array-class
Ruby | Array to_ary() function
Last Updated: 06 December 2019
Array#to_ary() : to_ary() is a Array class method which returns self array representation. Syntax: Array.to_ary()Parameter: ArrayReturn: self array representation. Example...
read more
Ruby
Ruby-Methods
Ruby Array-class
Ruby | Array to_a() function
Last Updated: 06 December 2019
Array#to_a() : to_a() is a Array class method which returns self array.Syntax: Array.to_a()Parameter: ArrayReturn: self array representationExample #1 :[sourcecode languag...
read more
Ruby
Ruby-Methods
Ruby Array-class
Ruby | Array take_while() function
Last Updated: 06 December 2019
Array#take_while() : take_while() is a Array class method which returns elements to the block until the block returns nil or false.Syntax: Array.take_while()Parameter: Arr...
read more
Ruby
Ruby-Methods
Ruby Array-class
Ruby | Array repeated_combination() function
Last Updated: 06 December 2019
Array#repeated_combination() : repeated_combination() is a Array class method which returns all repeated combinations of length n of elements from the array and then retur...
read more
Ruby
Ruby-Methods
Ruby Array-class
Ruby | Array reject!() function
Last Updated: 06 December 2019
Array#reject!() : reject!() is a Array class method which returns a new array containing the values which are not returned by the block. Syntax: Array.reject!()Parameter: ...
read more
Ruby
Ruby-Methods
Ruby Array-class
Ruby | Array reject() function
Last Updated: 06 December 2019
Array#reject() : reject() is a Array class method which returns new array containing the items in the array for which the given block is not trueSyntax: Array.reject()Para...
read more
Ruby
Ruby-Methods
Ruby Array-class
Ruby | Array take() function
Last Updated: 06 December 2019
Array#take() : take() is a Array class method which returns the number of elements in the array.Syntax: Array.take()Parameter: ArrayReturn: the number of elements in the a...
read more
Ruby
Ruby-Methods
Ruby Array-class
Ruby | Array sort_by!() function
Last Updated: 24 January 2022
Array#sort_by!() : sort_by!() is a Array class method which returns the enumerator for the sorted array. Syntax: Array.sort_by!()Parameter: ArrayReturn: the enumerator for...
read more
Ruby
Ruby-Methods
Ruby Array-class
Ruby | Array sort!() function
Last Updated: 06 December 2019
Array#sort!() : sort!() is a Array class method which returns sorted self array in place.Syntax: Array.sort!()Parameter: ArrayReturn: sorted self array in place.Example #1...
read more
Ruby
Ruby-Methods
Ruby Array-class
Ruby | Array none?() function
Last Updated: 06 December 2019
Array#none?() : none?() is a Array class method which checks whether the array is empty or not.Syntax: Array.none?()Parameter: ArrayReturn: true - if array has no elements...
read more
Ruby
Ruby-Methods
Ruby Array-class
Ruby | Array min() function
Last Updated: 06 December 2019
Array#min() : min() is a Array class method which returns the minimum value in this array.Syntax: Array.min()Parameter: ArrayReturn: the minimum value in this array.Exampl...
read more
Ruby
Ruby-Methods
Ruby Array-class
1
2
3
4
5
6
7
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !