- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Mukul Latiyan has Published 474 Articles
![Mukul Latiyan](https://www.tutorialspoint.com/assets/profiles/308320/profile/60_124990-1617352847.jpg)
Mukul Latiyan
291 Views
The transpose function in Ruby is mainly used to return the transpose of an array or a matrix.Syntaxarray.transposeOrMatrix.transposeLet's take a couple of examples of the transpose function on array first and then on matrices.Example 1Consider the code shown below# transpose() in array # array declaration first_arr = [[18, 22], [33, ... Read More
![Mukul Latiyan](https://www.tutorialspoint.com/assets/profiles/308320/profile/60_124990-1617352847.jpg)
Mukul Latiyan
856 Views
The most widely used functions in Ruby when it comes to arrays are push(), pop(), and clear() functions. These functions are used when we want to enter, take out and clear the array data, respectively. In this article, we will learn about all these functions one by one.push() FunctionThe push ... Read More
![Mukul Latiyan](https://www.tutorialspoint.com/assets/profiles/308320/profile/60_124990-1617352847.jpg)
Mukul Latiyan
366 Views
In Ruby, we have two functions available to us in case we want to reverse the contents of a string. These two functions are reverse and reverse!. While both of them are used to reverse the string, the only difference between them is that the reverse function reverses the string ... Read More
![Mukul Latiyan](https://www.tutorialspoint.com/assets/profiles/308320/profile/60_124990-1617352847.jpg)
Mukul Latiyan
238 Views
In this article, we will learn how to push (insert) and pop (remove) elements in a queue in Ruby.In Ruby, we can insert elements into a queue with the help of the push function. The syntax of the push function is shown below.queueName.push(element)Notice that the above syntax accepts one argument, ... Read More
![Mukul Latiyan](https://www.tutorialspoint.com/assets/profiles/308320/profile/60_124990-1617352847.jpg)
Mukul Latiyan
1K+ Views
In Ruby, we make use of the select() method when we want to find the array from the hash based on the condition and we make use of the select!() method when we want to check whether the array from the hash is present or not.Let's explore a few examples ... Read More
![Mukul Latiyan](https://www.tutorialspoint.com/assets/profiles/308320/profile/60_124990-1617352847.jpg)
Mukul Latiyan
4K+ Views
Global variables have a global scope and they can be accessed from anywhere in a program. Assignments to global variables can be made from anywhere in the program. Global variables are always prefixed with a dollar sign.It is necessary to define a global variable to have a variable that is ... Read More
![Mukul Latiyan](https://www.tutorialspoint.com/assets/profiles/308320/profile/60_124990-1617352847.jpg)
Mukul Latiyan
282 Views
A function that calls itself directly or indirectly is called a recursive function, and the corresponding function is referred to as a recursive function. Recursion makes the process easier and it definitely reduces the compilation time.We will try to understand the concept of recursion in Ruby with the help of ... Read More
![Mukul Latiyan](https://www.tutorialspoint.com/assets/profiles/308320/profile/60_124990-1617352847.jpg)
Mukul Latiyan
402 Views
There are often cases where we would want to execute a normal expression multiple times inside a method but without having to repeat the same expression again and again. With the yield keyword, we can do the same.We can also pass arguments to the yield keyword and get values in return ... Read More
![Mukul Latiyan](https://www.tutorialspoint.com/assets/profiles/308320/profile/60_124990-1617352847.jpg)
Mukul Latiyan
249 Views
We know that everything in Ruby is treated as an object, and so the true, false and nil as well. They are built-in types that Ruby provides to do different conditional checks and more. In this article, we will explore different examples of the true, false and nil data types ... Read More
![Mukul Latiyan](https://www.tutorialspoint.com/assets/profiles/308320/profile/60_124990-1617352847.jpg)
Mukul Latiyan
2K+ Views
Static Members in Ruby are declared with the help of the class. Since Ruby doesn't provide a reserved keyword such as static, when we make use of the class variable, then we create a static variable and then we can declare a method of that class in which the static ... Read More