diff options
author | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-03-08 16:13:26 +0000 |
---|---|---|
committer | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-03-08 16:13:26 +0000 |
commit | 835513a23486946b389b2cfec2ad2db1cf7fca22 (patch) | |
tree | 705db7659c34ea2f1f9a8bf4892692fe856319fd /test/ruby | |
parent | 4bcd1853af7bd1efc9f68d521dd9d52fa5fa19f0 (diff) | |
download | ruby-835513a23486946b389b2cfec2ad2db1cf7fca22.tar.gz |
* test/ruby/test_object.rb: add a test for Object#method_missing.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_object.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_object.rb b/test/ruby/test_object.rb index 2116c6a216..d339fb9c10 100644 --- a/test/ruby/test_object.rb +++ b/test/ruby/test_object.rb @@ -294,6 +294,14 @@ class TestObject < Test::Unit::TestCase assert_raise(NoMethodError) do 1.instance_eval { method_missing(:method_missing) } end + + c.class_eval do + undef_method(:method_missing) + end + + assert_raise(ArgumentError) do + c.new.method_missing + end end def test_send_with_no_arguments |