Jakub Arnold Jakub Arnold - 1 year ago 67
Ruby Question

Difference between "and" and && in Ruby?

What is the difference between the

operators in Ruby?

Answer Source

and is the same as && but with lower precedence. They both use short-circuit evaluation.

WARNING: and even has lower precedence than = so you'll want to avoid and always

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download