title: Why doesn't puts() print in a single line?
body: <p>This is a piece of code:</p>
  
  <pre><code>def add(a, b) 
    a + b;
  end
  
  print "Tell number 1 : "
  number1 = gets.to_f
  
  print "and number 2 : "
  number2 = gets.to_f
  
  puts "#{number1}+#{number2} = " , add(number1, number2) , "\n"`
  </code></pre>
  
  <p>When I run it, my results are spread over several lines:</p>
  
  <pre>
  C:\Users\Filip>ruby ext1.rb
  Tell number 1 : 2
  and number 2 : 3
  3.0+3.0 =
  5.0
  
  
  C:\Users\Filip>
  </pre>
  
  <p>Why doesn't <code>puts()</code> print in a single line, and how can keep the output on one line?</p>