+ 2
What is the use of <=> operator in ruby?
ruby operator <=> use!!!
2 odpowiedzi
+ 11
a <=> b :=
if a < b then return -1
if a = b then return 0
if a > b then return 1
if a and b are not comparable then return nil
https://stackoverflow.com/questions/827649/what-is-the-ruby-spaceship-operator
+ 2
thank you
😊😊