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

Allow assigning and using local variable name conflicting with command #961

Merged
merged 1 commit into from
Jun 30, 2024

Conversation

tompng
Copy link
Member

@tompng tompng commented May 26, 2024

Fixes #958

Assignment like expression is treated as expression.

help = 1
help += 1
help ||= 1

These are still command calls.

show_source === -s
show_source =~ -s
help == 1

If local variable is defined, it will be an expression.

help = show_source = 1
# These were command. After local variable defined, these will be an expression
show_source === -s
show_source =~ -s
help
help + 1
help show_source

@st0012 st0012 added the bug Something isn't working label Jun 30, 2024
@tompng tompng merged commit 00603d4 into ruby:master Jun 30, 2024
30 checks passed
@tompng tompng deleted the command_name_localvar branch June 30, 2024 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging this pull request may close these issues.

undefined method `extract_ruby_args=' for module IRB::Command (NoMethodError)
2 participants