summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/-test-/symbol/intern.c14
-rw-r--r--test/-ext-/symbol/test_inadvertent_creation.rb4
2 files changed, 2 insertions, 16 deletions
diff --git a/ext/-test-/symbol/intern.c b/ext/-test-/symbol/intern.c
deleted file mode 100644
index 6ae86a6..0000000
--- a/ext/-test-/symbol/intern.c
+++ /dev/null
@@ -1,14 +0,0 @@
-#include "ruby.h"
-
-static VALUE
-bug_sym_interned_p(VALUE self, VALUE name)
-{
- ID id = rb_check_id(&name);
- return id ? Qtrue : Qfalse;
-}
-
-void
-Init_intern(VALUE klass)
-{
- rb_define_singleton_method(klass, "interned?", bug_sym_interned_p, 1);
-}
diff --git a/test/-ext-/symbol/test_inadvertent_creation.rb b/test/-ext-/symbol/test_inadvertent_creation.rb
index 82a6403..238d362 100644
--- a/test/-ext-/symbol/test_inadvertent_creation.rb
+++ b/test/-ext-/symbol/test_inadvertent_creation.rb
@@ -7,7 +7,7 @@ module Test_Symbol
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)
+ end while ::Symbol.find(name)
name
end
@@ -16,7 +16,7 @@ module Test_Symbol
end
def assert_not_interned(name, msg = nil)
- assert_not_send([Bug::Symbol, :interned?, name], msg)
+ assert_not_send([::Symbol, :find, name], msg)
end
def assert_not_interned_error(obj, meth, name, msg = nil)