Why does Ruby's 'gets' includes the closing newline?

后端 未结 4 788
醉话见心
醉话见心 2020-11-30 12:16

I never need the ending newline I get from gets. Half of the time I forget to chomp it and it is a pain in the....

Why is it there?

4条回答
提交回复
热议问题