mirror of
https://github.com/ruby/ruby.git
synced 2025-08-28 15:36:16 +02:00
dup String#rpartition return value
* string.c (rb_str_rpartition): return duplicated receiver, when no splits. [ruby-core:82911] [Bug#13925] Author: Seiei Miyagi <hanachin@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b0326bce01
commit
e1be1d0c38
2 changed files with 6 additions and 1 deletions
|
@ -2445,6 +2445,11 @@ CODE
|
|||
bug8138 = '[ruby-dev:47183]'
|
||||
assert_equal(["\u30E6\u30FC\u30B6@\u30C9\u30E1", ".", "\u30A4\u30F3"],
|
||||
"\u30E6\u30FC\u30B6@\u30C9\u30E1.\u30A4\u30F3".rpartition(/[@.]/), bug8138)
|
||||
|
||||
bug = '[ruby-core:82911]'
|
||||
hello = "hello"
|
||||
hello.rpartition("hi").map(&:upcase!)
|
||||
assert_equal("hello", hello, bug)
|
||||
end
|
||||
|
||||
def test_setter
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue