aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_string.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-09-23 07:09:06 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-09-23 07:09:06 +0000
commitb8804a03f1a649d79501fcebf49cacabf0cbcccf (patch)
treeeb586d1364627ca90e05c956f232baa24bff741f /test/ruby/test_string.rb
parent49a15b266fa9f29f86ee3290500a6156e130609b (diff)
downloadruby-b8804a03f1a649d79501fcebf49cacabf0cbcccf.tar.gz
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
Diffstat (limited to 'test/ruby/test_string.rb')
-rw-r--r--test/ruby/test_string.rb5
1 files changed, 5 insertions, 0 deletions
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