Method: Kernel#chop
- Defined in:
- ruby.c
#chop ⇒ Object
Equivalent to ($_.dup).chop!
, except nil
is never returned. See String#chop!. Available only when -p/-n command line option specified.
1926 1927 1928 1929 1930 1931 1932 |
# File 'ruby.c', line 1926
static VALUE
rb_f_chop(VALUE _)
{
VALUE str = rb_funcall_passing_block(uscore_get(), rb_intern("chop"), 0, 0);
rb_lastline_set(str);
return str;
}
|