mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
4bcd1853af
commit
835513a234
2 changed files with 12 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
Mon Mar 9 01:12:37 2009 Yusuke Endoh <mame@tsg.ne.jp>
|
||||
|
||||
* test/ruby/test_object.rb: add a test for Object#method_missing.
|
||||
|
||||
Mon Mar 9 01:11:17 2009 Yusuke Endoh <mame@tsg.ne.jp>
|
||||
|
||||
* test/ruby/test_file_exhaustive.rb: add tests for File#size and
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue