Read more

Precedence of Ruby operators

Arne Hartherz
September 30, 2010Software engineer at makandra GmbH
  1. [ ] [ ]=
  2. **
  3. ! ~ + -
  4. * / %
  5. + -
  6. >> <<
  7. &
  8. ^ |
  9. <= < > >=
  10. <=> == === != =~ !~
  11. &&
  12. ||
  13. .. ...
  14. ? :
  15. = %= { /= -= += |= &= >>= <<= *= &&= ||= **=
  16. defined?
  17. not
  18. or and
  19. if unless while until
  20. begin/end

For more information see Table 18.4 Show archive.org snapshot in The Pragmatic Programmer's Guide Show archive.org snapshot .

Illustration money motivation

Opscomplete powered by makandra brand

Save money by migrating from AWS to our fully managed hosting in Germany.

  • Trusted by over 100 customers
  • Ready to use with Ruby, Node.js, PHP
  • Proactive management by operations experts
Read more Show archive.org snapshot
Posted by Arne Hartherz to makandra dev (2010-09-30 16:19)