method

chomp!

v1_8_7_330 - Show latest stable - Class: Kernel
chomp!(...)
public

Equivalent to $_.chomp!(string). See String#chomp!

$_ = "now\n"
chomp!       #=> "now"
$_           #=> "now"
chomp! "x"   #=> nil
$_           #=> "now"