From c9ad044dfb797efff78a17caccb64cbb72b4a552 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 8 Apr 2009 10:48:52 +0000 Subject: [PATCH] * test/ruby/test_string.rb (test_chop, test_chop!): tests for [ruby-core:23155]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_string.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb index ee9c2144f3..b209296ef9 100644 --- a/test/ruby/test_string.rb +++ b/test/ruby/test_string.rb @@ -405,6 +405,7 @@ class TestString < Test::Unit::TestCase assert_equal(S("hello\n"), S("hello\n\r").chop) assert_equal(S(""), S("\r\n").chop) assert_equal(S(""), S("").chop) + assert_equal(S("a").hash, S("a\u00d8").chop.hash) end def test_chop! @@ -423,6 +424,10 @@ class TestString < Test::Unit::TestCase a = S("").chop! assert_nil(a) + a = S("a\u00d8") + a.chop! + assert_equal(S("a").hash, a.hash) + a = S("hello\n") b = a.dup assert_equal(S("hello"), a.chop!)