1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

try to fix symbol duplication.

* test/objspace/test_objspace.rb (test_count_symbols): make more complex dynamic
  symbols to avoid conflict with other existing static symbols.
  Sometimes this test fails with "mortal_dynamic_symbol=>127".



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ko1 2017-06-22 08:33:33 +00:00
parent f1b7003f35
commit dc44df8a06

View file

@ -419,7 +419,7 @@ class TestObjSpace < Test::Unit::TestCase
end
def test_count_symbols
syms = (1..128).map{|i| ("xyzzy#{i}" * 128).to_sym}
syms = (1..128).map{|i| ("xyzzy#{i}_#{Process.pid}_#{rand(1_000_000)}_" * 128).to_sym}
c = Class.new{define_method(syms[-1]){}}
h = ObjectSpace.count_symbols