aboutsummaryrefslogtreecommitdiffstats
path: root/test/-ext-/symbol/noninterned_name.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/-ext-/symbol/noninterned_name.rb')
-rw-r--r--test/-ext-/symbol/noninterned_name.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/-ext-/symbol/noninterned_name.rb b/test/-ext-/symbol/noninterned_name.rb
new file mode 100644
index 0000000000..7c9097ae25
--- /dev/null
+++ b/test/-ext-/symbol/noninterned_name.rb
@@ -0,0 +1,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