Add inequality and chained comparisons

This commit is contained in:
js.sevestre 2013-06-28 09:52:39 +02:00
parent e37b1745a7
commit ff14723ee6

View File

@ -49,11 +49,24 @@ False
not True #=> False
not False #=> True
# Equality is ==
1 == 1 #=> True
2 == 1 #=> False
# Inequality is !=
1 != 1 #=> False
2 != 1 #=> True
# More comparisons
1 < 10 #=> True
1 > 10 #=> False
2 <= 2 #=> True
2 >= 2 #=> True
# Comparisons can be chained !
1 < 2 < 3 #=> True
2 < 3 < 2 #=> False
# Strings are created with " or '
"This is a string."
'This is also a string.'