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

Fix help message of the eval command #1130

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

matthieuprat
Copy link

When running the eval command (or its alias, call) without an argument, you get the following error:

[REPL ERROR] #<NameError: undefined local variable or method `cmd' for #<DEBUGGER__::Session:0x0000000120a0fa20>>
  debug-1.10.0/lib/debug/session.rb:934:in `block in register_default_command'
  debug-1.10.0/lib/debug/session.rb:1165:in `process_command'
  ...

...instead of this hint:

To evaluate the variable `eval`, use `pp eval` instead.

I believe the regression was introduced in a402e73.

To fix this issue, I was thinking of passing the command name alongside the argument in the process_line method but I wasn't sure this was worth it just for this hint. So I removed the hint altogether instead.

When running the `eval` command (or its alias, `call`) without an
argument, you get the following error:

```
[REPL ERROR] #<NameError: undefined local variable or method `cmd' for #<DEBUGGER__::Session:0x0000000120a0fa20>>
  debug-1.10.0/lib/debug/session.rb:934:in `block in register_default_command'
  debug-1.10.0/lib/debug/session.rb:1165:in `process_command'
  ...
```

...instead of this hint:

```
To evaluate the variable `eval`, use `pp eval` instead.
```

I believe the regression was introduced in a402e73.

To fix this issue, I was thinking of passing the command name alongside
the argument in the `process_line` method but I wasn't sure this was
worth it just for this hint. So I removed the hint altogether instead.
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.

1 participant