diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-10-03 12:19:19 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-10-03 12:19:19 +0000 |
| commit | 7211354a565892ae77bfdac90142a596f3661ca7 (patch) | |
| tree | 24a1181ea6e641e9b59e8cb320cec66649a54c84 /test/ruby/test_class.rb | |
| parent | d66ad8c8d6c73fb9fa715f78b15889ab5c3e876e (diff) | |
| download | ruby-7211354a565892ae77bfdac90142a596f3661ca7.tar.gz ruby-7211354a565892ae77bfdac90142a596f3661ca7.tar.xz ruby-7211354a565892ae77bfdac90142a596f3661ca7.zip | |
* vm_method.c (rb_add_method_def): no redefinition warning on
undef.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_class.rb')
| -rw-r--r-- | test/ruby/test_class.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/ruby/test_class.rb b/test/ruby/test_class.rb index 409fc49e4..8fe127231 100644 --- a/test/ruby/test_class.rb +++ b/test/ruby/test_class.rb @@ -150,7 +150,15 @@ class TestClass < Test::Unit::TestCase Class.new do define_method(:foo) do end alias bar foo - alias barf oo + alias bar foo + end + end + assert_equal("", stderr) + + stderr = EnvUtil.verbose_warning do + Class.new do + def foo; end + undef foo end end assert_equal("", stderr) |
