diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-10-24 09:25:05 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-10-24 09:25:05 +0000 |
commit | 9afe0278b31be55ae59e9bb15c0c1fec08b1f328 (patch) | |
tree | b1da738b5a549d634d1a79fe73f1eecb14dcd956 | |
parent | 5f7be192dfe963e381724867cf4d099e104540a2 (diff) | |
download | ruby-9afe0278b31be55ae59e9bb15c0c1fec08b1f328.tar.gz |
* test/ruby/test_array.rb (TestArray#test_join): should restore
global variable after the test. [ruby-dev:36896]
* test/ruby/test_hash.rb (TestHash#test_to_s): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | test/ruby/test_array.rb | 6 | ||||
-rw-r--r-- | test/ruby/test_hash.rb | 1 |
3 files changed, 12 insertions, 2 deletions
@@ -1,3 +1,10 @@ +Fri Oct 24 18:21:31 2008 Yukihiro Matsumoto <matz@ruby-lang.org> + + * test/ruby/test_array.rb (TestArray#test_join): should restore + global variable after the test. [ruby-dev:36896] + + * test/ruby/test_hash.rb (TestHash#test_to_s): ditto. + Fri Oct 24 17:43:26 2008 Yukihiro Matsumoto <matz@ruby-lang.org> * parse.y (lambda): need to adjust lpar_beg for ripper as well. diff --git a/test/ruby/test_array.rb b/test/ruby/test_array.rb index 69544cfc51..1b917ca77a 100644 --- a/test/ruby/test_array.rb +++ b/test/ruby/test_array.rb @@ -814,6 +814,8 @@ class TestArray < Test::Unit::TestCase s = a.join assert_equal(true, s.tainted?) assert_equal(true, s.untrusted?) + ensure + $, = nil end def test_last @@ -1220,8 +1222,8 @@ class TestArray < Test::Unit::TestCase $, = ":" a = @cls[1, 2, 3] assert_equal("[1, 2, 3]", a.to_s) - - $, = "" + ensure + $, = nil end def test_uniq diff --git a/test/ruby/test_hash.rb b/test/ruby/test_hash.rb index de0ba37fb7..5a17ac4fb5 100644 --- a/test/ruby/test_hash.rb +++ b/test/ruby/test_hash.rb @@ -627,6 +627,7 @@ class TestHash < Test::Unit::TestCase assert_equal(h.inspect, h.to_s) h = @cls[] assert_equal(h.inspect, h.to_s) + ensure $, = nil end |