Merged
Conversation
This appears to be the cause of a failure in the CSV tests as discussed at jruby#6157. The following code should restart the Enumerator and print "0" twice, but the second `next` triggers a "dead fiber" error without this patch: ```ruby Enumerator.new { 2.times {|i| raise i.to_s } }.tap {|f| 2.times { f.next rescue puts $!.message } } ```
See jruby#6157 for a CSV test that failed due to this missing behavior in JRuby, specifically the comments here: jruby#6157 (comment)
Member
Author
|
Failure is due to my removing an exclude that doesn't fail on MacOS. |
Member
Author
|
I do not agree with the restarting behavior, so I have filed https://bugs.ruby-lang.org/issues/16816 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 fixes the remaining failure in CSV as discussed in #6157. Enumerators that fail prematurely due to an exception should be re-started on the next call to
next.