New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

String#split gives incorrect output when splitting by /^/ #1693

Closed
norman opened this Issue May 1, 2012 · 3 comments

Comments

Projects
None yet
2 participants
@norman

norman commented May 1, 2012

RBX incorrectly includes empty strings in the resulting array.

MRI and JRuby:

>>  "a\n a".split(/^/)
=> ["a\n", " a"]

RBX (tried on both 1.4.2 and 2.0.0-dev):

>> "a\n a".split(/^/)
=> ["a\n", "", " a"]
@ileitch

This comment has been minimized.

Show comment
Hide comment
@ileitch

ileitch May 1, 2012

Member

Looks like a dup of #1690

Member

ileitch commented May 1, 2012

Looks like a dup of #1690

@ileitch ileitch closed this May 1, 2012

@norman

This comment has been minimized.

Show comment
Hide comment
@norman

norman May 1, 2012

Yup, didn't see that. Sorry for the noise.

norman commented May 1, 2012

Yup, didn't see that. Sorry for the noise.

@ileitch

This comment has been minimized.

Show comment
Hide comment
@ileitch

ileitch May 1, 2012

Member

No worries, thanks for trying Rubinius :)

Member

ileitch commented May 1, 2012

No worries, thanks for trying Rubinius :)

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