From e1be1d0c3815be2819f525e3c1d1ec34ccdc398b Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 23 Sep 2017 07:09:06 +0000 Subject: dup String#rpartition return value * string.c (rb_str_rpartition): return duplicated receiver, when no splits. [ruby-core:82911] [Bug#13925] Author: Seiei Miyagi git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_string.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/ruby/test_string.rb') diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb index b90c620381..08dc806380 100644 --- a/test/ruby/test_string.rb +++ b/test/ruby/test_string.rb @@ -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 -- cgit v1.2.3