Ruby usuń ostatni element sznurka

'abc1234'.chomp(4) # => 'abc123'
'toto'.chomp('to') # => 'to'
Lioruby