diff options
author | Adam Bard <github@adambard.com> | 2015-10-31 18:30:36 +0800 |
---|---|---|
committer | Adam Bard <github@adambard.com> | 2015-10-31 18:30:36 +0800 |
commit | c297cfa4f0ed9053cd4c6d9615385c51477f8b1f (patch) | |
tree | 3a8f7e4b3e050264af778c79a997b8f5a691f0a4 | |
parent | c6f00942987a348bba16cd975e74c32b36985da4 (diff) | |
parent | ec601c168aa50368822411d7487e81027388db53 (diff) |
Merge pull request #1909 from farisj/ruby-adds-combined-comparison
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 |