In your specific example, the outputs are the same, but there is a difference. The goal of freedom of dividers is to allow other characters within the literal text not to slip away. If you use certain characters as delimiters, you cannot use them inside a notation without escaping. Depending on what you might have, you should use different delimiters.
["foo()", "bar()"] %w(foo() bar()) # => error %w[foo() bar()] ["foo[1]", "bar[5]"] %w(foo[1] bar[5]) %w[foo[1] bar[5]] # => error
sawa
source share