Skip to content

Fix enum arg handling in Enumerator Nexter#815

Merged
1 commit merged intojruby:masterfrom
dmarcotte:enum_args
Jun 21, 2013
Merged

Fix enum arg handling in Enumerator Nexter#815
1 commit merged intojruby:masterfrom
dmarcotte:enum_args

Conversation

@dmarcotte
Copy link
Contributor

This fixes #264. I noticed that issue had the same symptoms that #807 addressed for each_with_index. This pull extends the #807 fix to cover the next case.

Note also that the regression test no_args_method.new.enum_for(:my_method).next.should == nil added here actually hangs prior to this fix (the nexter queue blocked forever waiting for a value that's not coming; now we explicitly feed it the nil), so avoiding that is a nice bonus.

Between the updated arg handing and avoiding that hang, it seems like there's a chance some specs can be untagged now... I'll have a look soon.

The Nexter for Enumerators needs to have its enum args packed in the
same way as each_with_index.  Refactor the arg handling in EachWithIndex
to cover this case too.
@dmarcotte
Copy link
Contributor Author

Hrm... I see Travis didn't like this pull, but that must be a red herring: I got a clean run on my branch.

Thoughts on the failures noted for this pull: the timeout problem is probably intermittent (needs a tag?), and we can see the String#sub with pattern and block restores $~ after leaving the block failure (here and here) also fail in this unrelated build.

Hope that helps!

@headius
Copy link
Member

headius commented Jun 21, 2013

@dmarcotte: I will give your patch a run locally, and see if we need some additional tags to stabilize those failures. Thanks!

@ghost ghost merged commit e23e804 into jruby:master Jun 21, 2013
@dmarcotte dmarcotte deleted the enum_args branch July 1, 2013 16:57
This pull request was closed.
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.

JRuby19mode behavior is different with CRuby. When Enumerator has mulltiple values for a block paramter.

3 participants