summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-10-07 11:29:37 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-10-07 11:29:37 +0000
commitd5e7b3972c8a9aec4ad828abf4f7a1a7e3024d9b (patch)
tree104cbe887be22a2813c068ac1e0cfba8c4ff2703 /test
parent881891fb2f2762c321ba128f50d1717ce5b1fc48 (diff)
* test/-ext-/symbol/test_inadvertent_creation.rb (noninterned_name):
sigil of global, instance and class variable names should be followed by non-numeric. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/-ext-/symbol/test_inadvertent_creation.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/-ext-/symbol/test_inadvertent_creation.rb b/test/-ext-/symbol/test_inadvertent_creation.rb
index e2295c2651..b1be3f6744 100644
--- a/test/-ext-/symbol/test_inadvertent_creation.rb
+++ b/test/-ext-/symbol/test_inadvertent_creation.rb
@@ -3,8 +3,8 @@ require "-test-/symbol/symbol"
module Test_Symbol
class TestInadvertent < Test::Unit::TestCase
- def noninterned_name(prefix = "_")
- prefix += Thread.current.object_id.to_s(36)
+ def noninterned_name(prefix = "")
+ prefix += "_#{Thread.current.object_id.to_s(36)}"
begin
name = "#{prefix}_#{rand(0x1000).to_s(16)}_#{Time.now.usec}"
end while Bug::Symbol.interned?(name)