Simplified assertion exception stack trace trimming. #22
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR simplifies the assertion stack trace trimming I implemented previously, which I copied from Phony.
I found an edge-case bug in the code to do with manually constructing the exception from outside the library's namespace. It probably isn't affecting anyone in the real world, but I ended up refactoring the code to be much simpler, so I thought I'd update the Leo code also.
In addition, I fixed one of the current warnings generated by the test suite. There are still a couple of others to do with
ArrayAccess
support inInclusionMatcher
, so the build will fail here, and that's expected. I'll submit another PR to fix those up shortly.