diff options
Diffstat (limited to 'vm.c')
-rw-r--r-- | vm.c | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -1480,7 +1480,17 @@ rb_binding_add_dynavars(VALUE bindval, rb_binding_t *bind, int dyncount, const I tmp_node.nd_body = 0; tmp_node.nd_args = 0; - VALUE vast = rb_ruby_ast_new(RNODE(&tmp_node), (rb_parser_ary_t *)INT2FIX(-1)); + VALUE vast = rb_ruby_ast_new(RNODE(&tmp_node)); + { /* + * TODO: + * Assigning -1 to line_count is to maintain the previous code. + * However, the author of this patch guesses this code is no longer necessary. + * We will try to remove this code in the next commit which is atomically + * revertable if the author is wrong. + */ + rb_ast_t *ast = (rb_ast_t *)DATA_PTR(vast); + ast->body.line_count = -1; + } if (base_iseq) { iseq = rb_iseq_new(vast, ISEQ_BODY(base_iseq)->location.label, path, realpath, base_iseq, ISEQ_TYPE_EVAL); |