ruby-changes:43802
From: usa <ko1@a...>
Date: Fri, 12 Aug 2016 11:50:54 +0900 (JST)
Subject: [ruby-changes:43802] usa:r55875 (ruby_2_2): merge revision(s) 55609: [Backport #12568]
usa 2016-08-12 11:50:50 +0900 (Fri, 12 Aug 2016) New Revision: 55875 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=55875 Log: merge revision(s) 55609: [Backport #12568] * vm_args.c (setup_parameters_complex): don't raise ArgumentError if an array is given for instance_exec with optional argument. [ruby-core:76300] [Bug #12568] https://github.com/rails/rails/pull/25699 Modified directories: branches/ruby_2_2/ Modified files: branches/ruby_2_2/ChangeLog branches/ruby_2_2/test/ruby/test_lambda.rb branches/ruby_2_2/version.h branches/ruby_2_2/vm_args.c Index: ruby_2_2/version.h =================================================================== --- ruby_2_2/version.h (revision 55874) +++ ruby_2_2/version.h (revision 55875) @@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_2/version.h#L1 #define RUBY_VERSION "2.2.6" #define RUBY_RELEASE_DATE "2016-08-12" -#define RUBY_PATCHLEVEL 347 +#define RUBY_PATCHLEVEL 348 #define RUBY_RELEASE_YEAR 2016 #define RUBY_RELEASE_MONTH 8 Index: ruby_2_2/vm_args.c =================================================================== --- ruby_2_2/vm_args.c (revision 55874) +++ ruby_2_2/vm_args.c (revision 55875) @@ -578,6 +578,7 @@ setup_parameters_complex(rb_thread_t * c https://github.com/ruby/ruby/blob/trunk/ruby_2_2/vm_args.c#L578 case arg_setup_lambda: if (given_argc == 1 && given_argc != iseq->param.lead_num && + !iseq->param.flags.has_opt && !iseq->param.flags.has_rest && args_check_block_arg0(args, th)) { given_argc = RARRAY_LENINT(args->rest); Index: ruby_2_2/ChangeLog =================================================================== --- ruby_2_2/ChangeLog (revision 55874) +++ ruby_2_2/ChangeLog (revision 55875) @@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_2/ChangeLog#L1 +Fri Aug 12 11:48:27 2016 NARUSE, Yui <naruse@r...> + + * vm_args.c (setup_parameters_complex): don't raise ArgumentError + if an array is given for instance_exec with optional argument. + [ruby-core:76300] [Bug #12568] + https://github.com/rails/rails/pull/25699 + Fri Aug 12 11:45:02 2016 Shugo Maeda <shugo@r...> * lib/net/http/generic_rquest.rb (write_header): A Request-Line must Index: ruby_2_2/test/ruby/test_lambda.rb =================================================================== --- ruby_2_2/test/ruby/test_lambda.rb (revision 55874) +++ ruby_2_2/test/ruby/test_lambda.rb (revision 55875) @@ -71,6 +71,13 @@ class TestLambdaParameters < Test::Unit: https://github.com/ruby/ruby/blob/trunk/ruby_2_2/test/ruby/test_lambda.rb#L71 assert_raise(ArgumentError, bug9605) {proc(&plus).call [1,2]} end + def test_instance_exec + bug12568 = '[ruby-core:76300] [Bug #12568]' + assert_nothing_raised(ArgumentError, bug12568) do + instance_exec([1,2,3], &->(a=[]){ a }) + end + end + def yield_1(arg) yield arg end Property changes on: ruby_2_2 ___________________________________________________________________ Modified: svn:mergeinfo Merged /trunk:r55609 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/