aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_module.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_module.rb')
-rw-r--r--test/ruby/test_module.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb
index bfb347c468..c50cd38b79 100644
--- a/test/ruby/test_module.rb
+++ b/test/ruby/test_module.rb
@@ -788,6 +788,8 @@ class TestModule < Test::Unit::TestCase
end
def test_method_redefinition
+ feature2155 = '[ruby-dev:39400]'
+
line = __LINE__+4
stderr = EnvUtil.verbose_warning do
Module.new do
@@ -796,6 +798,7 @@ class TestModule < Test::Unit::TestCase
end
end
assert_match(/:#{line}: warning: method redefined; discarding old foo/, stderr)
+ assert_match(/:#{line-1}: warning: previous definition of foo/, stderr, feature2155)
stderr = EnvUtil.verbose_warning do
Module.new do
@@ -823,6 +826,7 @@ class TestModule < Test::Unit::TestCase
end
end
assert_match(/:#{line}: warning: method redefined; discarding old foo/, stderr)
+ assert_match(/:#{line-1}: warning: previous definition of foo/, stderr, feature2155)
stderr = EnvUtil.verbose_warning do
Module.new do