2 ms·
Ruby string interpolation can only happen in literal source code, not in user input. 2.4.0 :001 > a = 5 => 5 2.4.0 :002 > gets.chomp #{a} => "\#{a
by smitherfield 10y ago
Ruby string interpolation can only happen in literal source code, not in user input.
2.4.0 :001 > a = 5
=> 5
2.4.0 :002 > gets.chomp
#{a}
=> "\#{a}"