summaryrefslogtreecommitdiff
path: root/ruby_parser.c
diff options
context:
space:
mode:
-rw-r--r--ruby_parser.c11
1 files changed, 7 insertions, 4 deletions
@@ -758,9 +758,7 @@ static void
ast_free(void *ptr)
{
rb_ast_t *ast = (rb_ast_t *)ptr;
- if (ast) {
- rb_ast_free(ast);
- }
}
static const rb_data_type_t ast_data_type = {
@@ -777,7 +775,12 @@ static VALUE
ast_alloc(void)
{
rb_ast_t *ast;
- return TypedData_Make_Struct(0, rb_ast_t, &ast_data_type, ast);
}
VALUE