From 1de888d40788392886e8eeec0814db93b5fd8085 Mon Sep 17 00:00:00 2001 From: yugui Date: Mon, 4 May 2009 12:29:44 +0000 Subject: merges r23155 and r23158 from trunk into ruby_1_9_1. -- * string.c (rb_str_chop_bang): reset coderange. [ruby-core:23155] -- * test/ruby/test_string.rb (test_chop, test_chop!): tests for [ruby-core:23155]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23332 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_string.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test') diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb index f3aa45a737..7fa2ead9b6 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!) -- cgit v1.2.3