summaryrefslogtreecommitdiff
path: root/test/-ext-
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-11-01 00:42:41 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-11-01 00:42:41 +0000
commit632f448827347626d0c8d1ceef234b00984ce7a4 (patch)
tree45824a41bcf2ff8f59871964078dd55865931a5f /test/-ext-
parent5dbc3d1e7919f1ee2058baec9555684ee0babed0 (diff)
On some platforms, object_id can be negative value like NetBSD.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33597 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/-ext-')
-rw-r--r--test/-ext-/symbol/test_inadvertent_creation.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/-ext-/symbol/test_inadvertent_creation.rb b/test/-ext-/symbol/test_inadvertent_creation.rb
index b1be3f6744e..7c0aaa89f0e 100644
--- a/test/-ext-/symbol/test_inadvertent_creation.rb
+++ b/test/-ext-/symbol/test_inadvertent_creation.rb
@@ -4,7 +4,7 @@ require "-test-/symbol/symbol"
module Test_Symbol
class TestInadvertent < Test::Unit::TestCase
def noninterned_name(prefix = "")
- prefix += "_#{Thread.current.object_id.to_s(36)}"
+ prefix += "_#{Thread.current.object_id.to_s(36).tr('-', '_')}"
begin
name = "#{prefix}_#{rand(0x1000).to_s(16)}_#{Time.now.usec}"
end while Bug::Symbol.interned?(name)