The result of gets is indeed a String, but the return value from 
String#length is a Fixnum.
You don't need to use #to_s until the output.

total = a.length + b.length
Fixnum

total.to_s
String

puts 'length is ' + total.to_s

-- 
Posted via http://www.ruby-forum.com/.