def chomp(sep = $/) "ruby\n".chomp #=> "ruby" end
Returns a new string with the trailing newline removed.
Raised by Encoding and String methods when a transcoding operation fails.
Encoding
String