aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_object.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_object.rb')
-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 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))