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 test for for-loop with global variable as iterator name #1163

Merged
merged 1 commit into from
Jun 24, 2024

Conversation

herwinw
Copy link
Member

@herwinw herwinw commented Jun 23, 2024

No description provided.

@andrykonchin
Copy link
Member

Thank you!

@andrykonchin andrykonchin merged commit 2cde58f into ruby:master Jun 24, 2024
14 checks passed
$var.should == 3
n.should == 3
$var = old_global_var
end
Copy link
Member

@andrykonchin andrykonchin Jun 24, 2024

Choose a reason for hiding this comment

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

It seems the only not test case left is using an attribute, e.g.

class A
  attr_accessor :foo
end
a = A.new

for a.foo in []
end

Copy link
Member Author

Choose a reason for hiding this comment

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

For reference: #1166

@herwinw herwinw deleted the for_target_global_variable branch June 24, 2024 11:52
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.

2 participants