From 102918a3ee06b30023e1b7c7fe1103179049c1d9 Mon Sep 17 00:00:00 2001 From: matz Date: Mon, 28 Sep 2009 03:09:16 +0000 Subject: git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_object.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'test') diff --git a/test/ruby/test_object.rb b/test/ruby/test_object.rb index e4026eccba..8effe02310 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)) -- cgit v1.2.3