In creating a CLI bank challenge for my SheNomads Mentorship program, I found out about a RuboCop error surrounding the use of Array Literals, when referring to an Array of Words.
Apparently, there’s ‘Percent Notation’, which is preferred to the literal array syntax, as mentioned in Batssov’s Ruby-Style-Guide, the source of RuboCop’s preferences. When you use Array literal you get this warning:
'Use `%w` or `%W` for array of words'
Percent Notation lets you “stringify” a set of characters, separated and returned as a certain object, depending on the modifier.