method

chomp!

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

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

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