From ff25801e9b4535e729398e87b3410049aa4d91d2 Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 25 Oct 2008 09:47:54 +0000 Subject: * test/ruby/test_proc.rb (test_proc_args_unleashed): test for [ruby-core:19485]. * test/ruby/test_yield.rb (test_block_args_unleashed): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19933 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_proc.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/ruby/test_proc.rb') diff --git a/test/ruby/test_proc.rb b/test/ruby/test_proc.rb index ee53eeaf3..8d2521b02 100644 --- a/test/ruby/test_proc.rb +++ b/test/ruby/test_proc.rb @@ -309,4 +309,11 @@ class TestProc < Test::Unit::TestCase def test_binding2 assert_raise(ArgumentError) { proc {}.curry.binding } end + + def test_proc_args_unleashed + r = proc {|a,b=1,*c,d,e| + [a,b,c,d,e] + }.call(1,2,3,4,5) + assert_equal([1,2,[3],4,5], r, "[ruby-core:19485]") + end end -- cgit