问题
Possible Duplicate:
Is there any wisdom behind “and”, “or” operators in Ruby ?
What is the difference, if any, between the following pairs of logical operators?
- && vs. and
- || vs. or
回答1:
The "word" versions have lower precedence than the "symbol" versions. In fact, they have even lower precedence than assignment.
来源:https://stackoverflow.com/questions/3225613/ruby-logical-operators