Issue #9116 has been updated by shyouhei (Shyouhei Urabe).


We looked at this issue in today's developer meeting.

Someone there pointed out that in general, rsplit(..., 2) could be avoided by using regexp, because you can match $ (for instance, you can match /(.+)--([^-]+)$/ for the session cookie).  So the cookie case is a bit short for us to add new method.

It might make sense when the limit is bigger than 2.  Is there such eample?

----------------------------------------
Feature #9116: String#rsplit missing
https://bugs.ruby-lang.org/issues/9116#change-63566

* Author: artagnon (Ramkumar Ramachandra)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
----------------------------------------
There's nothing corresponding to Python's rsplit(). A quick glance at rb_str_split_m() tells me that it should be pretty trivial to implement. Is there any specific reason it hasn't already been done?



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>