1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

This commit is contained in:
matz 2009-09-28 03:09:16 +00:00
parent 438b28d3f7
commit 102918a3ee
6 changed files with 43 additions and 18 deletions

View file

@ -333,9 +333,12 @@ class TestObject < Test::Unit::TestCase
end
foobar = foo.method(:foobar)
assert_equal(-1, foobar.arity);
assert_equal([:foo], foobar.call);
assert_equal([:foo, 1], foobar.call(1));
assert_equal([:foo, 1, 2, 3, 4, 5], foobar.call(1, 2, 3, 4, 5));
assert_equal(foobar, foo.method(:foobar))
assert_not_equal(foobar, c.new.method(:foobar))
c = Class.new(c)
assert_equal(false, c.method_defined?(:foobar))