What is the difference between write amd puts when writing files in ruby? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What is the difference between write amd puts when writing files in ruby?

4th Mar 2017, 9:17 AM
Emmanuel Nuotah
3 Answers
0
Puts uses 1/0 (input output) console gem. The .write uses binary code output
4th Mar 2017, 11:53 PM
Jan Andersson
Jan Andersson - avatar
0
both are the same
4th Mar 2017, 11:53 PM
Jan Andersson
Jan Andersson - avatar
0
when writing to files write acts like print in Ruby, write won't create a new line whereas puts will.
16th Mar 2017, 12:26 PM
iRonnie16
iRonnie16 - avatar