def chomp(sep = $/) "ruby\n".chomp #=> "ruby" end
Returns a new string with the trailing newline removed.
Can be raised by IO operations when IO#timeout= is set.
IO
IO#timeout=