End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Ripper#column
ripper.column → Integer
parse.c
View on GitHub ↗
static VALUE
ripper_column(VALUE self)
{
struct parser_params *p;
long col;
TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
if (!ripper_initialized_p(p)) {
rb_raise(rb_eArgError, "method called for uninitialized object");
}
if (NIL_P(p->parsing_thread)) return Qnil;
col = p->lex.ptok - p->lex.pbeg;
return LONG2NUM(col);
}
Return column number of current parsing line. This number starts from 0.