End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Ripper#state
ripper.state → Integer
parse.c
View on GitHub ↗
static VALUE
ripper_state(VALUE self)
{
struct parser_params *p;
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;
return INT2NUM(p->lex.state);
}
Return scanner state of current token.