aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-24 17:28:56 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-24 17:28:56 +0000
commit6dd9388545183868ac08ab2dad7b3d4c4a4b07e4 (patch)
tree254497843ddd0fbf60ee700008bf99071bc50990 /test
parent01e9a7be61ad5a9be0fe3a0c6c469d03ff21f51e (diff)
downloadruby-6dd9388545183868ac08ab2dad7b3d4c4a4b07e4.tar.gz
* string.c (rb_str_chomp_bang): coderange may change.
[ruby-core:22414] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_string.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb
index a995087bbc..bf3861e74d 100644
--- a/test/ruby/test_string.rb
+++ b/test/ruby/test_string.rb
@@ -339,6 +339,8 @@ class TestString < Test::Unit::TestCase
assert_equal(S("hello"), S("hello").chomp)
assert_equal(S("hello"), S("hello!").chomp)
$/ = save
+
+ assert_equal(S("a").hash, S("a\u0101").chomp(S("\u0101")).hash, '[ruby-core:22414]')
end
def test_chomp!
@@ -393,6 +395,8 @@ class TestString < Test::Unit::TestCase
s = "foo\r"
s.chomp!("")
assert_equal("foo\r", s)
+
+ assert_equal(S("a").hash, S("a\u0101").chomp!(S("\u0101")).hash, '[ruby-core:22414]')
end
def test_chop