cossacklabs / homebrew-tap

Homebrew tap for CossackLabs packages
Apache License 2.0
0 stars 3 forks source link

Prefer single quotes #1

Closed shadinua closed 5 years ago

shadinua commented 5 years ago

Ruby classic style prefer single quotes until we need interpolation.

shadinua commented 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.