summaryrefslogtreecommitdiffstats
path: root/test/ruby
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-09-28 03:09:16 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-09-28 03:09:16 +0000
commited89a3bb20eafd6a564929833e6a4134ad84fdf0 (patch)
tree81ff0a9316d3abe54e8aff5e33e4729faeaff3f1 /test/ruby
parent191e9c2260f4f1a0f572fc4c29eae73c60270b3b (diff)
downloadruby-ed89a3bb20eafd6a564929833e6a4134ad84fdf0.tar.gz
ruby-ed89a3bb20eafd6a564929833e6a4134ad84fdf0.tar.xz
ruby-ed89a3bb20eafd6a564929833e6a4134ad84fdf0.zip
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_object.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ruby/test_object.rb b/test/ruby/test_object.rb
index e4026eccb..8effe0231 100644
--- a/test/ruby/test_object.rb
+++ b/test/ruby/test_object.rb
@@ -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))