diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-04-08 11:08:18 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-04-08 11:08:18 +0000 |
commit | 6387c5dc8c3b67f289b47cd82111c106b08ff7bb (patch) | |
tree | 264d96422fa41253f0352d11d72cd6921a578930 /test/ruby | |
parent | c9ad044dfb797efff78a17caccb64cbb72b4a552 (diff) | |
download | ruby-6387c5dc8c3b67f289b47cd82111c106b08ff7bb.tar.gz |
* string.c (rb_str_rstrip_bang): should not sign-expand non-ascii.
[ruby-core:23158]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_string.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb index b209296ef9..e87b6d3c8f 100644 --- a/test/ruby/test_string.rb +++ b/test/ruby/test_string.rb @@ -1139,6 +1139,8 @@ class TestString < Test::Unit::TestCase def test_strip assert_equal(S("x"), S(" x ").strip) assert_equal(S("x"), S(" \n\r\t x \t\r\n\n ").strip) + assert_equal(S(""), S("\xa0".force_encoding("iso-8859-1")).strip) + assert_equal(S("a"), S("a\xa0".force_encoding("iso-8859-1")).strip) end def test_strip! |