How to print something without a new line in ruby
puts
statement in ruby automatically adds a new line, how do I avoid it?
Solution 1:
Use print
instead.
You may want to follow it up by STDOUT.flush
.
Solution 2:
Also, you'll need to append "\r" at end of line to indicate "carriage return" and do next print at beginning of current line