3 ms·
Also, string interpolation using only double quotes has bothered me in Rails. That was the one feature I saw that they supported, although now that I think abou
by jmtame 15y ago
Also, string interpolation using only double quotes has bothered me in Rails. That was the one feature I saw that they supported, although now that I think about it, Rails probably adopted it as a convention to prevent excessive escaping.
- jeltz 15y agoI believe this interpolation difference in Ruby originates from Perl which in turn got it from bash and other UNIX shells. I actually like the fact that Ruby and Perl have so many way to quote a string a lot since I have always hated excessive escaping.
- manveru 15y agoThat's Ruby, not Rails. It allows you to influence how your content should be escaped, so you write '\n' instead of "\\n" and '"' instead of "\"", it's actually pretty handy in practice.