What is the difference between STDIN.gets.chomp() and STDIN.gets?
Thanks.
What is the difference between STDIN.gets.chomp() and STDIN.gets?
Thanks.
The difference is the method chomp, which is available in the
documentation:
Essentially it removes the trailing carriage return a user hitting
enter.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs