summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-07-01 13:56:55 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-07-01 13:56:55 +0900
commit99dc885974bfe637f3e74f52efdbbf77d66d0d68 (patch)
tree5ac459dc3dcb36217fe674a0936ed4f8d361315b /test
parent6982a9049ede1386fdfa10734f953867824ebe05 (diff)
Fixed inadvertent ID creation in rb_iv_get
Diffstat (limited to 'test')
-rw-r--r--test/-ext-/symbol/test_inadvertent_creation.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/-ext-/symbol/test_inadvertent_creation.rb b/test/-ext-/symbol/test_inadvertent_creation.rb
index b304f09933..40b3f59f7f 100644
--- a/test/-ext-/symbol/test_inadvertent_creation.rb
+++ b/test/-ext-/symbol/test_inadvertent_creation.rb
@@ -482,5 +482,14 @@ module Test_Symbol
foo.call(name.to_sym => 42)
end
end
+
+ def test_iv_get
+ obj = Object.new
+ assert_warning(/not initialized/) do
+ assert_no_immortal_symbol_created("rb_iv_get") do |name|
+ Bug::Symbol.iv_get(obj, name)
+ end
+ end
+ end
end
end