diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-09-28 03:09:16 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-09-28 03:09:16 +0000 |
commit | 102918a3ee06b30023e1b7c7fe1103179049c1d9 (patch) | |
tree | 81ff0a9316d3abe54e8aff5e33e4729faeaff3f1 /test/ruby/test_object.rb | |
parent | 438b28d3f7a3989cc01020d2f14f9b2cfb859e7c (diff) | |
download | ruby-102918a3ee06b30023e1b7c7fe1103179049c1d9.tar.gz |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_object.rb')
-rw-r--r-- | test/ruby/test_object.rb | 3 |
1 files changed, 3 insertions, 0 deletions
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)) |