If a method name ends with a question mark (?), as in eql?, then the method returns a Boolean : Reserved words « Language Basics « Ruby






If a method name ends with a question mark (?), as in eql?, then the method returns a Boolean


x = 1.0
y = 1.0
x.eql? y # => true

 








Related examples in the same category

1.Ruby's reserved words
2.If a method name ends in an exclamation point (!), as in delete!
3.If a method name ends in an equals sign (=), as in family_name=
4.Classes and modules begin with an upper case letter.