Skip to content
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

Add specs for for loop with attribute target #1166

Merged
merged 3 commits into from
Jun 25, 2024

Conversation

herwinw
Copy link
Member

@herwinw herwinw commented Jun 25, 2024

The specs with safe navigation require a segfault with MRI until very recent versions (https://bugs.ruby-lang.org/issues/20468), so these had to be wrapped in eval blocks.

The specs with safe navigation require a segfault with MRI until very
recent versions (https://bugs.ruby-lang.org/issues/20468), so these had
to be wrapped in eval blocks.
n.should == 3
end

ruby_version_is "3.4" do
Copy link
Member

@andrykonchin andrykonchin Jun 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would also add a link to the issue. I suppose the fix will be backported soon so the version guard will be removed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added the link, but the bug report doesn't mention anything about backports, so I'm not sure if we should be expecting it. But the link doesn't hurt.

I added specs for the syntax for a[0]/a[:a] in x as well, according to Prism these are different parse nodes than the regular for foo.bar in x

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use ruby_bug for this, and it should be backported (segfault fixes should basically always be backported)

andrykonchin
andrykonchin previously approved these changes Jun 25, 2024
@herwinw herwinw dismissed andrykonchin’s stale review June 25, 2024 12:28

The change has been updated

@andrykonchin
Copy link
Member

Thank you!

@andrykonchin andrykonchin merged commit 3563e4f into ruby:master Jun 25, 2024
14 checks passed
@herwinw herwinw deleted the for_target_attribute branch June 25, 2024 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants