summaryrefslogtreecommitdiff
path: root/test/ruby/test_string.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_string.rb')
-rw-r--r--test/ruby/test_string.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb
index 648287a..10e4970 100644
--- a/test/ruby/test_string.rb
+++ b/test/ruby/test_string.rb
@@ -624,6 +624,8 @@ class TestString < Test::Unit::TestCase
a.taint
assert(a.gsub(/./, S('X')).tainted?)
+ assert_equal("z", "abc".gsub(/./, "a" => "z"), "moved from btest/knownbug")
+
assert_raise(ArgumentError) { "foo".gsub }
end
@@ -1063,6 +1065,9 @@ class TestString < Test::Unit::TestCase
assert_equal([S("a"), S(""), S("b"), S("c"), S("")], S("a||b|c|").split(S('|'), -1))
assert_equal([], "".split(//, 1))
+
+ assert_equal("[2, 3]", [1,2,3].slice!(1,10000).inspect, "moved from btest/knownbug")
+
end
def test_squeeze