summaryrefslogtreecommitdiff
path: root/test/ruby/test_module.rb
diff options
context:
space:
mode:
authorJeremy Evans <code@jeremyevans.net>2020-12-09 20:53:02 -0800
committerJeremy Evans <code@jeremyevans.net>2020-12-10 10:16:05 -0800
commit01b7d5acc702df22d306ae95f1a9c3096e63e624 (patch)
treeec42028540f04653d1022a1ed83d509df77bd723 /test/ruby/test_module.rb
parent4a559aa22537bbd2f17c7babb1aca48d1a3a4647 (diff)
Remove the uninitialized instance variable verbose mode warning
This speeds up all instance variable access, even when not in verbose mode. Uninitialized instance variable warnings were rarely helpful, and resulted in slower code if you wanted to avoid warnings when run in verbose mode. Implements [Feature #17055]
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3879
Diffstat (limited to 'test/ruby/test_module.rb')
-rw-r--r--test/ruby/test_module.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb
index d63f31a56f..b676145ba7 100644
--- a/test/ruby/test_module.rb
+++ b/test/ruby/test_module.rb
@@ -2401,7 +2401,7 @@ class TestModule < Test::Unit::TestCase
def test_uninitialized_instance_variable
a = AttrTest.new
- assert_warning(/instance variable @ivar not initialized/) do
+ assert_warning('') do
assert_nil(a.ivar)
end
a.instance_variable_set(:@ivar, 42)
@@ -2410,7 +2410,7 @@ class TestModule < Test::Unit::TestCase
end
name = "@\u{5909 6570}"
- assert_warning(/instance variable #{name} not initialized/) do
+ assert_warning('') do
assert_nil(a.instance_eval(name))
end
end