Yes, it's the modulo operator, like in other programming languages, not sure on the grammar rules used by Ruby to distinguish between when it's a quote prefix and when it's an operator, but it seems like: %w+5 1 + => ["5","1"] w=2; 5 %w+2 + => (waits for more inpout, % is the modulo operator and not a prefix) 5 %w + 2 => 3 # n %= w is like n = n % w, as in C/C++ (the + is just a delimiter, [ ] or ( ) can be used, or & &, = =, and many others)
Ruby wrong syntax highlighting