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

Rescue on undefined local variables in frame_binding #419

Merged
merged 2 commits into from
Jun 24, 2018
Merged

Rescue on undefined local variables in frame_binding #419

merged 2 commits into from
Jun 24, 2018

Conversation

pdobb
Copy link
Contributor

@pdobb pdobb commented May 4, 2018

Some local variables appear to be undefined in the frame_binding.

For example, I see errors on local variables: m, args, block, r, and target when inspecting an error on a class that inherits from SimpleDelegator.

Fix: Add a rescue on NameError to catch these.
Fixes issue: #351

Inspiration for this fix comes from @glebtv in glebtv@6d00365

Example:

better_errors_fix

For example, I see errors on local variables: `m`, `args`, `block`, `r`, and `target` when inspecting an error on a class that inherits from SimpleDelegator.

Fix: Add a rescue on NameError to catch these.
Fixes issue: #351

Inspiration for this fix comes from @glebtv in glebtv@6d00365
@RobinDaugherty
Copy link
Member

Thanks for your contribution! Do you think you could add a test that covers this?

@pdobb
Copy link
Contributor Author

pdobb commented May 5, 2018

Yes, I will give it a shot! Thanks.

@pdobb
Copy link
Contributor Author

pdobb commented May 6, 2018

@RobinDaugherty done. I added the tests as a fixup commit. I'm assuming you'll do a squash and merge if accepted. But let me know if I can do anything else. Thanks for your work on this excellent gem!

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

Successfully merging this pull request may close these issues.

2 participants