1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* yarvcore.h, compile.c (set_arguments): support post arguments.

* test/ruby/test_method.rb: add tests for above.
* test/ruby/test_proc.rb: ditto.
* proc.c: fix an arity bug ([ruby-core:11029]).
* vm.c, vm.h, insns.def, vm_dump.h: fix bmethod process.
* vm.c: support block argument on block parameter.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ko1 2007-05-01 04:35:58 +00:00
parent ea2cb282ae
commit 75d28f8870
12 changed files with 148 additions and 44 deletions

View file

@ -8,6 +8,8 @@ class TestMethod < Test::Unit::TestCase
def mo2(a, b = nil) end
def mo3(*a) end
def mo4(a, *b, &c) end
def mo5(a, *b, c) end
def mo6(a, *b, c, &d) end
class Base
def foo() :base end
@ -24,6 +26,8 @@ class TestMethod < Test::Unit::TestCase
assert_equal(-2, method(:mo2).arity)
assert_equal(-1, method(:mo3).arity)
assert_equal(-2, method(:mo4).arity)
assert_equal(-3, method(:mo5).arity)
assert_equal(-3, method(:mo6).arity)
end
def test_unbind