Skip to content

Ruby 2.6 : Add String#split with a blcok#6010

Merged
kares merged 2 commits intojruby:ruby-2.6from
k77ch7:ruby-2.6-add-string-split-with-block
Dec 27, 2019
Merged

Ruby 2.6 : Add String#split with a blcok#6010
kares merged 2 commits intojruby:ruby-2.6from
k77ch7:ruby-2.6-add-string-split-with-block

Conversation

@k77ch7
Copy link
Contributor

@k77ch7 k77ch7 commented Dec 26, 2019

This PR implements String#split with a blcok.

See Feature #4780.

@kares
Copy link
Member

kares commented Dec 26, 2019

we might prefer keeping the old signatures - as it might be used by some ext.
and adding a new split overloads with the IRubyObject return and a block arg (annotated with @JRubyMethod) ...

@k77ch7
Copy link
Contributor Author

k77ch7 commented Dec 26, 2019

@kares Thanks for your advice.
I tried refactoring.
Is my understanding correct?

@kares
Copy link
Member

kares commented Dec 27, 2019

thanks - the idea for having split with block might have been to avoid creating the array.
still good enough as an initial implementation!

@kares kares merged commit 519dba1 into jruby:ruby-2.6 Dec 27, 2019
@kares kares added this to the JRuby 9.3.0.0 milestone Dec 29, 2019
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.

2 participants