时间:2020-07-31 13:43
人气:
作者:admin
内容来自 《“笨方法”学ruby》、https://www.runoob.com/ ,此处仅做记录
alias and BEGIN begin break case class def defined? do else elsif END end ensure
false for if in module next nil nor or redo rescue retry return self super then true
undef unless until when while yield
true false nil constants strings numbers ranges arrays hashes
\\ \' \" \a \b \n \r \t \v
:: [] ** -(unary) +(unary) ! ~ * / % + - << >> & | > >= < <= <=> == === != =~ && || .. ...
comment: Hash与Array对比,除去底层数据结构不同外,最大的区别是有无序
| and | 和 |
|---|---|
| or | 或 |
| not | 非 |
| != | 不等于 |
| == | 等于 |
| >= | 大于等于 |
| <= | 小于等于 |
| true | 真 |
| false | 假 |