这里是
a table of the Ruby operators
.
可重载的方法有:
[ ] [ ]= Element reference, element set
** Exponentiation
! ~ + - Not, complement, unary plus and minus (method names for the last two are +@ and -@)
* / % Multiply, divide, and modulo
+ - Plus and minus
>> << Right and left shift
& Bitwise `and'
^ | Bitwise exclusive `or' and regular `or'
<= < > >= Comparison operators
<=> == === != =~ !~ Equality and pattern match operators (!= and !~ may not be defined as methods)
这个表来自2001年的Pickaxe手册,但它与Ruby1.9 Pickaxe手册中的表是相同的——没有理由相信这组中缀运算符会改变。