Skip to content

Commit 9ea77cb

Browse files
hasumikinyui-knk
authored andcommitted
Remove unnecessary assignment to ast->body.line_count
This patch removes a code that assigns `-1` to `ast->body.line_count` because, at least as of now, it looks not necessary. I made this commit atomically revertable if I was wrong. ## Relevant commits - The preparation for this PR: https://github.com/ruby/ruby/pull/10655/files#diff-2af2e7f2e1c28da5e9d99ad117cba1c4dabd8b0bc3081da88e414c55c6aa9549R1484-R1493 - The original commit that introduced the code: d65f745
1 parent ef3e3e9 commit 9ea77cb

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

vm.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1481,16 +1481,6 @@ rb_binding_add_dynavars(VALUE bindval, rb_binding_t *bind, int dyncount, const I
14811481
tmp_node.nd_args = 0;
14821482

14831483
VALUE vast = rb_ruby_ast_new(RNODE(&tmp_node));
1484-
{ /*
1485-
* TODO:
1486-
* Assigning -1 to line_count is to maintain the previous code.
1487-
* However, the author of this patch guesses this code is no longer necessary.
1488-
* We will try to remove this code in the next commit which is atomically
1489-
* revertable if the author is wrong.
1490-
*/
1491-
rb_ast_t *ast = (rb_ast_t *)DATA_PTR(vast);
1492-
ast->body.line_count = -1;
1493-
}
14941484

14951485
if (base_iseq) {
14961486
iseq = rb_iseq_new(vast, ISEQ_BODY(base_iseq)->location.label, path, realpath, base_iseq, ISEQ_TYPE_EVAL);

0 commit comments

Comments
 (0)