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

local_variables sometimes lies #13

Closed
hx opened this issue Aug 18, 2014 · 3 comments
Closed

local_variables sometimes lies #13

hx opened this issue Aug 18, 2014 · 3 comments

Comments

@hx
Copy link

hx commented Aug 18, 2014

I use the IntelliJ/RubyMine debugger, which occasionally trips on this line. The gist is here:

locals = eval("local_variables", binding)
locals.each {|local| result[local.to_s] = eval(local.to_s, binding)}

The local_variables method is reporting some variable names (in my case, m), which, when evaled, raises uncaught errors that crash the debugger.

I'm thinking, at the very least:

locals.each {|local| result[local.to_s] = eval(local.to_s, binding) rescue :ghost}

Then, in our debuggers' lists of locals, it'd be clear that the variable did or should exist, but doesn't. Also, we could still debug stuff.

Thoughts, anybody?

@os97673
Copy link
Member

os97673 commented Nov 11, 2014

Looks like a reasonable approach to avoid the critical problem.
PR is welcome ;)

@hx
Copy link
Author

hx commented Feb 26, 2015

@os97673 I just saw this. It's on my todo list now ;)

@os97673
Copy link
Member

os97673 commented Dec 4, 2015

I believe the problem has been fixed, feel free to reopen if it is not.

@os97673 os97673 closed this as completed Dec 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants