APIdock / Ruby
/
method

chomp

ruby latest stable - Class: Kernel
chomp(*args)
public

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

static VALUE
rb_f_chomp(int argc, VALUE *argv)
{
 VALUE str = rb_funcall_passing_block(uscore_get(), rb_intern("chomp"), argc, argv);
 rb_lastline_set(str);
 return str;
}

AltStyle によって変換されたページ (->オリジナル) /