Percent Notation
Ruby has many uses for the %
character. One of the more obscure uses is as a notion for custom delimited strings. Use the percent notation with a non-alphanumeric character to surround a string.
It even works with balanced characters
This is useful for defining a string that has both types of quotes
It's also useful for creating horribly obfuscated code
h/t Josh Davey
Last updated