diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-07-19 01:35:04 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-07-19 01:35:04 +0000 |
commit | 0493b1ce3a43a33bb6298762d67e1a1b4f0a9657 (patch) | |
tree | 7553612b4b68a8f6bf2572936af3d40ecf6d11ac /test/ruby | |
parent | 13155d4df577a2b5fc57c6b16cd92515c2d56870 (diff) | |
download | ruby-0493b1ce3a43a33bb6298762d67e1a1b4f0a9657.tar.gz |
revert r59359, r59356, r59355, r59354
These caused numerous CI failures I haven't been able to
reproduce [ruby-core:82102]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_optimization.rb | 38 | ||||
-rw-r--r-- | test/ruby/test_string.rb | 6 |
2 files changed, 0 insertions, 44 deletions
diff --git a/test/ruby/test_optimization.rb b/test/ruby/test_optimization.rb index 6cf6c63d1b..2d0eec02fd 100644 --- a/test/ruby/test_optimization.rb +++ b/test/ruby/test_optimization.rb @@ -181,44 +181,6 @@ class TestRubyOptimization < Test::Unit::TestCase assert_redefine_method('Hash', 'empty?', 'assert_nil({}.empty?); assert_nil({1=>1}.empty?)') end - def test_hash_reuse_fstring - embed = -'h e l l o' - shared = -'this string is too long to be embedded and should be shared' - assert_not_equal GC::INTERNAL_CONSTANTS[:RVALUE_SIZE], - ObjectSpace.memsize_of(shared), - 'update this test if string embedding changed' - - [ embed, shared ].each do |exp| - key = exp.split(' ').join(' ') - h = {} - h[key] = true - assert_not_same key, h.keys[0] - assert_predicate h.keys[0], :frozen? - assert_same exp, h.keys[0] - - h = { key => 1 } - assert_same exp, h.keys[0], 'newhash insn should reuse strings, too' - - h1 = {} - h2 = {} - key.taint - h1[key] = true - h2[key] = true - k1 = h1.keys[0] - k2 = h2.keys[0] - assert_same k1, k2 - assert_predicate k1, :tainted? - - h = { key => 1 } - assert_not_predicate key, :frozen? - assert_same k1, h.keys[0], 'newhash insn should reuse tainted strings' - - assert_equal GC::INTERNAL_CONSTANTS[:RVALUE_SIZE], - ObjectSpace.memsize_of(k1), - 'tainted string should share with untainted fstring' - end - end - def test_hash_aref_with h = { "foo" => 1 } assert_equal 1, h["foo"] diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb index e68a3078eb..8696e166d2 100644 --- a/test/ruby/test_string.rb +++ b/test/ruby/test_string.rb @@ -2750,14 +2750,8 @@ CODE assert_not_same(str, +str) assert_same(str, -str) - return unless @cls == String bar = %w(b a r).join('') - assert_not_predicate bar, :tainted? - assert_not_predicate str, :tainted? assert_same(str, -bar, "uminus deduplicates [Feature #13077]") - bar = %w(b a r).taint.join('') - tstr = str.dup.taint - assert_same -tstr, -bar end def test_ord |