summaryrefslogtreecommitdiffstats
path: root/test/ruby
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-05-24 23:06:57 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-05-24 23:06:57 +0000
commit920625868b76233b553378a9942001034ef523e9 (patch)
treeaf48efbc86c5e387832364372f3d037828795e37 /test/ruby
parent889a0bd773ac4c4881c790e0060588f9d3149d69 (diff)
downloadruby-920625868b76233b553378a9942001034ef523e9.tar.gz
ruby-920625868b76233b553378a9942001034ef523e9.tar.xz
ruby-920625868b76233b553378a9942001034ef523e9.zip
* string.c (rb_str_rpartition): ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_string.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb
index 4a784b18f..1d65c84c1 100644
--- a/test/ruby/test_string.rb
+++ b/test/ruby/test_string.rb
@@ -1712,6 +1712,8 @@ class TestString < Test::Unit::TestCase
assert_equal(%w(hel l o), "hello".rpartition(/l/))
assert_equal(%w(hel l o), "hello".rpartition("l"))
assert_raise(TypeError) { "hello".rpartition(1) }
+ def (hyphen = Object.new).to_str; "-"; end
+ assert_equal(%w(foo - bar), "foo-bar".rpartition(hyphen), '[ruby-core:23540]')
end
def test_setter