blob: 7c9097ae25fad6e0142b0fa7b52c4082e79e873f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
require "-test-/symbol"
module Test_Symbol
module NonInterned
module_function
def noninterned_name(prefix = "")
prefix += "_#{Thread.current.object_id.to_s(36).tr('-', '_')}"
begin
name = "#{prefix}_#{rand(0x1000).to_s(16)}_#{Time.now.usec}"
end while Bug::Symbol.find(name)
name
end
end
end
|