Skip to content

Conversation

@schneems
Copy link
Collaborator

Previously when a NoMethodError was raised from within the DeadEnd monkeypatch then an infinite loop would be caused by calling e.message since that would trigger our monkeypatch recursively.

This patch fixes the issue by aliasing the original method and explicitly using that instead.

This behavior is also tested. So while there still might be internal errors, at least they won't result in infinite loops with no output.

Previously when a NoMethodError was raised from within the DeadEnd monkeypatch then an infinite loop would be caused by calling `e.message` since that would trigger our monkeypatch recursively.

This patch fixes the issue by aliasing the original method and explicitly using that instead. 

This behavior is also tested. So while there still might be internal errors, at least they won't result in infinite loops with no output.
@schneems schneems force-pushed the schneems/safer-no-method-error branch from 5859239 to a1e4263 Compare December 30, 2020 15:51
@schneems schneems merged commit e2aeb7e into main Dec 30, 2020
@schneems schneems deleted the schneems/safer-no-method-error branch December 30, 2020 15:52
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