mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
use rb_ast_dispose
instead of rb_ast_free
`rb_ast_dispose` calls `rb_gc_writebarrier_remember`. Unless we call it, the marked objects may not be GC'ed until `rb_ast_t` is GC'ed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3ba9e6b639
commit
f09ad1dc5d
1 changed files with 1 additions and 1 deletions
2
parse.y
2
parse.y
|
@ -12109,7 +12109,7 @@ ripper_parse0(VALUE parser_v)
|
|||
parser_prepare(parser);
|
||||
parser->ast = rb_ast_new();
|
||||
ripper_yyparse((void*)parser);
|
||||
rb_ast_free(parser->ast);
|
||||
rb_ast_dispose(parser->ast);
|
||||
parser->ast = 0;
|
||||
return parser->result;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue