3 ms·
This is just string interpolation.
by tasogare 6y ago
This is just string interpolation.
- asicsp 6y ago%q allows different delimiters to represent single quoted strings, which doesn't have string interpolation. For ex: $ ruby -e 'a=5; puts "[#{a}]"' [5] $ ruby -e 'a=5; puts %q/[#{a}]/' [#{a}]
- byroot 6y ago%Q or just % does interpolation: $ ruby -e 'a=5; puts %Q/[#{a}]/' [5] $ ruby -e 'a=5; puts %/[#{a}]/' [5]