On Mon, Nov 25, 2013 at 5:04 PM, Jes=FAs Gabriel y Gal=E1n
<jgabrielygalan / gmail.com> wrote:
> On Mon, Nov 25, 2013 at 5:02 PM, Joshua P. <lists / ruby-forum.com> wrote:
>> ok this is my fault, the program I posted above was incomplete. The
>> error message i'm getting for the full code is below is: syntax error,
>> unexpected $end
>>
>> puts 'Hello there, whats your first name?'
>> f_name =3D gets.chomp
>> puts 'Excellent ' + f_name + 'now what is your middle name?'
>> m_name =3D gets.chomp
>> puts 'Thank you, and finally, what is your surname?'
>> s_name =3D gets.chomp
>> puts 'So youre first name is' + f_name+ 'your middle name is' + m_name +
>> 'and your surname is' + s_name +
>
> The last '+' should not be there.

It's better to use string interpolation:

puts 'Hello there, whats your first name?'
f_name =3D gets.chomp
puts 'Excellent #{f_name} now what is your middle name?'
m_name =3D gets.chomp
puts 'Thank you, and finally, what is your surname?'
s_name =3D gets.chomp
puts "So, your first name is #{f_name}, your middle name is #{m_name}
and your surname is #{s_name}"

Jesus.