summaryrefslogtreecommitdiffstats
path: root/test/ruby/test_string.rb
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-03 11:40:32 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-03 11:40:32 +0000
commit29216dec470d5f878980c0e3ea2eff83954dc363 (patch)
tree53c3191835e1c64760d3bb7ab9eaeb6829a1d6bd /test/ruby/test_string.rb
parent6aaeeec3834cf830c19cba9efb09b7bf41dfbb64 (diff)
merges r22608 from trunk into ruby_1_9_1.
-- * string.c (rb_str_chomp_bang): coderange may change. [ruby-core:22414] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@22739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_string.rb')
-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 a7a2bba0b..f3aa45a73 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