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:
parent
f1b7003f35
commit
dc44df8a06
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue