Closed shadinua closed 5 years ago
I would say more generally.
When string literal contains clauses that should be interpolated, we have to use double quotes:
name='Vixentael'
puts "Hello, #{name}!"
# Result
Hello, Vixentael!
But if literal doesn't contain such clauses, we have to use single quotes by default to prevent any risk of unexpected interpolation.
Ruby classic style prefer single quotes until we need interpolation.