diff options
author | Jake Faris <jake.faris@alphasights.com> | 2015-10-30 10:17:15 -0400 |
---|---|---|
committer | Jake Faris <jake.faris@alphasights.com> | 2015-10-30 10:17:15 -0400 |
commit | ec601c168aa50368822411d7487e81027388db53 (patch) | |
tree | b59dade295c733020307e7c1ebdcd7fb75e702b8 | |
parent | f0a4c88acfac9514aca6dd33e2d3f8c4d5e815dc (diff) |
Adds combined comparison operator to Ruby
-rw-r--r-- | ruby.html.markdown | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ruby.html.markdown b/ruby.html.markdown index 998b4bf7..6114c14e 100644 --- a/ruby.html.markdown +++ b/ruby.html.markdown @@ -77,6 +77,11 @@ false.class #=> FalseClass 2 <= 2 #=> true 2 >= 2 #=> true +# Combined comparison operator +1 <=> 10 #=> -1 +10 <=> 1 #=> 1 +1 <=> 1 #=> 0 + # Logical operators true && false #=> false true || false #=> true |