Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
Psych::Parser#_native_parse
_native_parse(p1, p2, p3)
ext/psych/psych_parser.c
View on GitHub ↗
static VALUE parse(VALUE self, VALUE handler, VALUE yaml, VALUE path)
{
psych_parser_t * parser;
struct parse_args pargs;
TypedData_Get_Struct(self, psych_parser_t, &psych_parser_type, parser);
if (parser->parsing) {
rb_raise(rb_const_get(mPsych, rb_intern("Exception")),
"parser is already parsing, it cannot be reused from a handler callback");
}
parser->parsing = 1;
pargs.psych_parser = parser;
pargs.self = self;
pargs.handler = handler;
pargs.yaml = yaml;
pargs.path = path;
return rb_ensure(parse_body, (VALUE)&pargs, parse_ensure, (VALUE)parser);
}
No documentation available