ruby-changes:11528
From: nobu <ko1@a...>
Date: Wed, 8 Apr 2009 19:50:35 +0900 (JST)
Subject: [ruby-changes:11528] Ruby:r23158 (trunk): * test/ruby/test_string.rb (test_chop, test_chop!): tests for .
nobu 2009-04-08 19:48:52 +0900 (Wed, 08 Apr 2009) New Revision: 23158 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=23158 Log: * test/ruby/test_string.rb (test_chop, test_chop!): tests for [ruby-core:23155]. Modified files: trunk/test/ruby/test_string.rb Index: test/ruby/test_string.rb =================================================================== --- test/ruby/test_string.rb (revision 23157) +++ test/ruby/test_string.rb (revision 23158) @@ -405,6 +405,7 @@ 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 @@ 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!) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/