8000 Remove not_used members completely by yui-knk · Pull Request #8662 · ruby/ruby · GitHub
[go: up one dir, main page]

Skip to content

Remove not_used members completely #8662

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Oct 15, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Check node type before accessing nd_next
This is also a preparation for removing not_used members from
STR NODE. Current codes work without node type check because NODE_STR
has not_used2 member corresponding to nd_next of NODE_LIST and
NODE_DSTR. However it causes problme once not_used members are
removed from NODE_STR.
  • Loading branch information
yui-knk committed Oct 14, 2023
commit 86d2eaa006f8de3d30f62ba4cfbe21a51f27755b
2 changes: 1 addition & 1 deletion parse.y
Original file line number Diff line number Diff line change
Expand Up @@ -8813,7 +8813,7 @@ heredoc_dedent(struct parser_params *p, NODE *root)
}

str_node = 0;
while ((node = RNODE_LIST(prev_node = node)->nd_next) != 0) {
while ((nd_type_p(node, NODE_LIST) || nd_type_p(node, NODE_DSTR)) && (node = RNODE_LIST(prev_node = node)->nd_next) != 0) {
next_str:
if (!nd_type_p(node, NODE_LIST)) break;
if ((str_node = RNODE_LIST(node)->nd_head) != 0) {
Expand Down
0