Skip to content
instance method

Kernel#chomp

chomp → $_
chomp(string) → $_

Equivalent to $_ = $_.chomp(<em>string</em>). See String#chomp. Available only when -p/-n command line option specified.

See also #catch #chop #caller_locations #class also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0