End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Ripper#encoding
ripper.encoding → encoding
parse.c
View on GitHub ↗
VALUE
rb_parser_encoding(VALUE vparser)
{
struct parser_params *p;
TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
return rb_enc_from_encoding(p->enc);
}
Return encoding of the source.