method

chop!

ruby latest stable - Class: String
chop!()
public

Processes str as for String#chop, returning str, or nil if str is the empty string. See also String#chomp!.