From b0c4ac77799fdf60a489f9e735158647c630865a Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 29 Jan 2013 07:49:22 +0000 Subject: proc.c: original arity * proc.c (rb_mod_method_arity): return original arity of the method if aliased because of visibility change, like as Method#arity. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/-ext-/method/test_arity.rb | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 test/-ext-/method/test_arity.rb (limited to 'test/-ext-/method') diff --git a/test/-ext-/method/test_arity.rb b/test/-ext-/method/test_arity.rb new file mode 100644 index 0000000000..79ef23b34f --- /dev/null +++ b/test/-ext-/method/test_arity.rb @@ -0,0 +1,37 @@ +require '-test-/method' +require 'test/unit' + +class TestMethod < Test::Unit::TestCase + class TestArity < Test::Unit::TestCase + class A + def foo0() + end + def foom1(*a) + end + def foom2(a,*b) + end + def foo1(a) + end + def foo2(a,b) + end + end + + class B