Skip to content

Fixed yielded arrays of 1 element bug when using Enumerator#first#2458

Merged
headius merged 1 commit intojruby:masterfrom
Who828:2376_bugfix
Jan 14, 2015
Merged

Fixed yielded arrays of 1 element bug when using Enumerator#first#2458
headius merged 1 commit intojruby:masterfrom
Who828:2376_bugfix

Conversation

@Who828
Copy link
Contributor

@Who828 Who828 commented Jan 13, 2015

Fixes an old issue #2376 with RubyYielder class.

This fix passes Rubyspecs and MRI specs, however let me know if there any changes required.

@headius
Copy link
Member

headius commented Jan 14, 2015

Good to get this fixed, but I hope we can figure out a lighter way to do it in the future. If I understand the logic, we're basically double-wrapping the value so that when unwrapped by yield logic it comes out unharmed. Will merge today.

headius added a commit that referenced this pull request Jan 14, 2015
Fixed yielded arrays of 1 element bug when using Enumerator#first
@headius headius merged commit 0b27dbc into jruby:master Jan 14, 2015
@headius headius added this to the JRuby 9.0.0.0-pre1 milestone Jan 14, 2015
@headius headius self-assigned this Jan 14, 2015
@nightscape
Copy link
Contributor

Ah, ok, so this is the corresponding PR. Sorry, didn't find it at first (hint: you can search for a SHA in Github and it will find the corresponding PR).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants