You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When assigning a local variable which's name is the same one of the debugging commands (e.g. info), it'd be treated as the command call instead of a local assignment:
irb(main):001> info = 123
`debug` command is only available when IRB is started with binding.irb
=> nil
The text was updated successfully, but these errors were encountered:
We can check command-like assignment by regexp like /\A#{COMMAND_NAME} (=|\+=|-=|\*=|...)/
info=123info += 1info <<= 1
Now, using local variable info seems hard because the code below will be treated as command
info + 1info << 1info > 42
But maybe this can be solved by extending the command-method override policy (NO_OVERRIDE OVERRIDE_ALL OVERRIDE_PRIVATE_ONLY) to also check local variables existence.
Description
When assigning a local variable which's name is the same one of the debugging commands (e.g.
info
), it'd be treated as the command call instead of a local assignment:The text was updated successfully, but these errors were encountered: