Ruby | Numeric method
The <=> is an inbuilt method in Ruby, which returns 0 if both the numbers are equal, else it returns 1. Syntax: a <=> b Parameters: The function needs two number whose comparison is to be done. Return Value: It returns 0 if both the numbers are same, else it returns 1. Example 1:  Rub