The "raise" with no arguments raises the exception in $!, nested case too#185
The "raise" with no arguments raises the exception in $!, nested case too#185aycabta wants to merge 1 commit intoruby:masterfrom
Conversation
olleolleolle
left a comment
There was a problem hiding this comment.
Your explanation of 2.4's behavior makes this fix of the test code very clear.
|
This just re-raises "cause_b" exception, and makes no sense. |
I think so, but I didn't want to say so. I do the complementary explanation that I did. The "nested exception" means chaining |
|
https://twitter.com/hsbt/status/816458882541228032 (Japanese, I read with translation) I grasped the overview around this tweet and its reply tree. If that tells you anything, I just made this Pull Request for 2.4's behavior, and I didn't understand the purpose of the test. I will leave it to appropriate one's judgement. ref. The test is added for jimweirich#272 at first. |
|
With this change, the test is almost same as |
|
OK, I got the picture. I'm thinking what |
`test_display_exception_details_cause_loop` is same as `test_display_exception_details_cause`. Fixed ruby#185
`test_display_exception_details_cause_loop` is same as `test_display_exception_details_cause`. Fixed ruby#185
Ruby 2.4 and later,
raise's behavior has been changed. Nestedraisewith an argument raises only the argument, it doesn't have outer exception. So I removed the argument. Theraisewith no arguments raises what contains nested exceptions.This fixes a failure of
TestRakeApplication#test_display_exception_details_cause_loopthat @hsbt refers at #184. This passed all Ruby versions in Travis CI....And this will fix Travis CI failure of #183.