Skip to content

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

Merged
tompng merged 1 commit into
ruby:masterfrom
tompng:command_name_localvar
Jun 30, 2024
Merged

tompng merged 1 commit into
ruby:masterfrom
tompng:command_name_localvar

Conversation

@tompng

@tompng tompng commented May 26, 2024 •

Copy link
Copy Markdown
Member

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants