summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-06-22 08:33:33 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-06-22 08:33:33 +0000
commitdc44df8a06cca6bd372505093b4f28ca70c24eb5 (patch)
tree5d610e16b6faaffbc6d7e10f48ba97caad4c8097 /test
parentf1b7003f35cae684cceeab710a5769458dfe7310 (diff)
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
Diffstat (limited to 'test')
-rw-r--r--test/objspace/test_objspace.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/objspace/test_objspace.rb b/test/objspace/test_objspace.rb
index 74e0ef9a50..21e1341ff3 100644
--- a/test/objspace/test_objspace.rb
+++ b/test/objspace/test_objspace.rb
@@ -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