[前][次][番号順一覧][スレッド一覧]

ruby-changes:45974

From: naruse <ko1@a...>
Date: Tue, 21 Mar 2017 23:04:30 +0900 (JST)
Subject: [ruby-changes:45974] naruse:r58045 (ruby_2_4): merge revision(s) 57192, 57464, 58016, 58018, 58019: [Backport #12705]

naruse	2017-03-21 23:04:23 +0900 (Tue, 21 Mar 2017)

  New Revision: 58045

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=58045

  Log:
    merge revision(s) 57192,57464,58016,58018,58019: [Backport #12705]
    
    [Bug #12705]
    add a ticket number.
    
    test_lambda.rb: refine test
    
    * test/ruby/test_lambda.rb (test_lambda_as_iterator): refine a
      test for the intention of the original report.
      [ruby-core:61340] [Bug #9605]
    test_lambda.rb: remove duplcate tests
    vm_args.c: arity check of lambda
    
    * vm_eval.c (rb_yield_lambda): new function which yields an array
      to a proc and splat to a lambda.  mainly for Enumerable only.
    
    * vm_args.c (setup_parameters_complex): remove special lambda
      splatting for [Bug #9605].  [ruby-core:77065] [Bug #12705]
    
    * vm_insnhelper.c (vm_callee_setup_block_arg): ditto.

  Modified directories:
    branches/ruby_2_4/
  Modified files:
    branches/ruby_2_4/enum.c
    branches/ruby_2_4/internal.h
    branches/ruby_2_4/test/ruby/test_lambda.rb
    branches/ruby_2_4/test/ruby/test_yield.rb
    branches/ruby_2_4/version.h
    branches/ruby_2_4/vm.c
    branches/ruby_2_4/vm_args.c
    branches/ruby_2_4/vm_eval.c
    branches/ruby_2_4/vm_insnhelper.c
Index: ruby_2_4/vm_insnhelper.c
===================================================================
--- ruby_2_4/vm_insnhelper.c	(revision 58044)
+++ ruby_2_4/vm_insnhelper.c	(revision 58045)
@@ -2522,12 +2522,6 @@ vm_callee_setup_block_arg(rb_thread_t *t https://github.com/ruby/ruby/blob/trunk/ruby_2_4/vm_insnhelper.c#L2522
 		    calling->argc = iseq->body->param.lead_num; /* simply truncate arguments */
 		}
 	    }
-	    else if (arg_setup_type == arg_setup_lambda &&
-		     calling->argc == 1 &&
-		     !NIL_P(arg0 = vm_callee_setup_block_arg_arg0_check(argv)) &&
-		     RARRAY_LEN(arg0) == iseq->body->param.lead_num) {
-		calling->argc = vm_callee_setup_block_arg_arg0_splat(cfp, iseq, argv, arg0);
-	    }
 	    else {
 		argument_arity_error(th, iseq, calling->argc, iseq->body->param.lead_num, iseq->body->param.lead_num);
 	    }
Index: ruby_2_4/vm_eval.c
===================================================================
--- ruby_2_4/vm_eval.c	(revision 58044)
+++ ruby_2_4/vm_eval.c	(revision 58045)
@@ -19,6 +19,7 @@ static inline VALUE method_missing(VALUE https://github.com/ruby/ruby/blob/trunk/ruby_2_4/vm_eval.c#L19
 static inline VALUE vm_yield_with_cref(rb_thread_t *th, int argc, const VALUE *argv, const rb_cref_t *cref, int is_lambda);
 static inline VALUE vm_yield(rb_thread_t *th, int argc, const VALUE *argv);
 static inline VALUE vm_yield_with_block(rb_thread_t *th, int argc, const VALUE *argv, VALUE block_handler);
+static inline VALUE vm_yield_lambda_splattable(rb_thread_t *th, VALUE args);
 static VALUE vm_exec(rb_thread_t *th);
 static void vm_set_eval_stack(rb_thread_t * th, const rb_iseq_t *iseq, const rb_cref_t *cref, const struct rb_block *base_block);
 static int vm_collect_local_variables_in_heap(rb_thread_t *th, const VALUE *dfp, const struct local_var_list *vars);
@@ -1068,6 +1069,12 @@ rb_yield_splat(VALUE values) https://github.com/ruby/ruby/blob/trunk/ruby_2_4/vm_eval.c#L1069
 }
 
 VALUE
+rb_yield_lambda(VALUE values)
+{
+    return vm_yield_lambda_splattable(GET_THREAD(), values);
+}
+
+VALUE
 rb_yield_block(VALUE val, VALUE arg, int argc, const VALUE *argv, VALUE blockarg)
 {
     return vm_yield_with_block(GET_THREAD(), argc, argv,
Index: ruby_2_4/vm.c
===================================================================
--- ruby_2_4/vm.c	(revision 58044)
+++ ruby_2_4/vm.c	(revision 58045)
@@ -1022,14 +1022,16 @@ static inline VALUE https://github.com/ruby/ruby/blob/trunk/ruby_2_4/vm.c#L1022
 invoke_block_from_c_splattable(rb_thread_t *th, VALUE block_handler,
 			       int argc, const VALUE *argv,
 			       VALUE passed_block_handler, const rb_cref_t *cref,
-			       int is_lambda)
+			       int splattable, int is_lambda)
 {
   again:
     switch (vm_block_handler_type(block_handler)) {
       case block_handler_type_iseq:
 	{
 	    const struct rb_captured_block *captured = VM_BH_TO_ISEQ_BLOCK(block_handler);
-	    return invoke_iseq_block_from_c(th, captured, captured->self, argc, argv, passed_block_handler, cref, TRUE, is_lambda);
+	    return invoke_iseq_block_from_c(th, captured, captured->self,
+					    argc, argv, passed_block_handler,
+					    cref, splattable, is_lambda);
 	}
       case block_handler_type_ifunc:
 	return vm_yield_with_cfunc(th, VM_BH_TO_IFUNC_BLOCK(block_handler), VM_BH_TO_IFUNC_BLOCK(block_handler)->self,
@@ -1037,7 +1039,8 @@ invoke_block_from_c_splattable(rb_thread https://github.com/ruby/ruby/blob/trunk/ruby_2_4/vm.c#L1039
       case block_handler_type_symbol:
 	return vm_yield_with_symbol(th, VM_BH_TO_SYMBOL(block_handler), argc, argv, passed_block_handler);
       case block_handler_type_proc:
-	is_lambda = block_proc_is_lambda(VM_BH_TO_PROC(block_handler));
+	if (!splattable)
+	    is_lambda = block_proc_is_lambda(VM_BH_TO_PROC(block_handler));
 	block_handler = vm_proc_to_block_handler(VM_BH_TO_PROC(block_handler));
 	goto again;
     }
@@ -1060,19 +1063,31 @@ check_block_handler(rb_thread_t *th) https://github.com/ruby/ruby/blob/trunk/ruby_2_4/vm.c#L1063
 static VALUE
 vm_yield_with_cref(rb_thread_t *th, int argc, const VALUE *argv, const rb_cref_t *cref, int is_lambda)
 {
-    return invoke_block_from_c_splattable(th, check_block_handler(th), argc, argv, VM_BLOCK_HANDLER_NONE, cref, is_lambda);
+    return invoke_block_from_c_splattable(th, check_block_handler(th),
+					  argc, argv, VM_BLOCK_HANDLER_NONE,
+					  cref, FALSE, is_lambda);
 }
 
 static VALUE
 vm_yield(rb_thread_t *th, int argc, const VALUE *argv)
 {
-    return invoke_block_from_c_splattable(th, check_block_handler(th), argc, argv, VM_BLOCK_HANDLER_NONE, NULL, FALSE);
+    return invoke_block_from_c_splattable(th, check_block_handler(th),
+					  argc, argv, VM_BLOCK_HANDLER_NONE,
+					  NULL, FALSE, FALSE);
 }
 
 static VALUE
 vm_yield_with_block(rb_thread_t *th, int argc, const VALUE *argv, VALUE block_handler)
 {
-    return invoke_block_from_c_splattable(th, check_block_handler(th), argc, argv, block_handler, NULL, FALSE);
+    return invoke_block_from_c_splattable(th, check_block_handler(th),
+					  argc, argv, block_handler,
+					  NULL, FALSE, FALSE);
+}
+
+static VALUE
+vm_yield_lambda_splattable(rb_thread_t *th, VALUE args)
+{
+    return invoke_block_from_c_splattable(th, check_block_handler(th), 1, &args, VM_BLOCK_HANDLER_NONE, NULL, TRUE, FALSE);
 }
 
 static inline VALUE
Index: ruby_2_4/enum.c
===================================================================
--- ruby_2_4/enum.c	(revision 58044)
+++ ruby_2_4/enum.c	(revision 58045)
@@ -39,7 +39,27 @@ rb_enum_values_pack(int argc, const VALU https://github.com/ruby/ruby/blob/trunk/ruby_2_4/enum.c#L39
     i = rb_enum_values_pack(argc, argv); \
 } while (0)
 
-#define enum_yield rb_yield_values2
+static VALUE
+enum_yield(int argc, VALUE ary)
+{
+    if (argc > 1)
+	return rb_yield_lambda(ary);
+    if (argc == 1)
+	return rb_yield(ary);
+    return rb_yield_values2(0, 0);
+}
+
+static VALUE
+enum_yield_array(VALUE ary)
+{
+    long len = RARRAY_LEN(ary);
+
+    if (len > 1)
+	return rb_yield_lambda(ary);
+    if (len == 1)
+	return rb_yield(RARRAY_AREF(ary, 0));
+    return rb_yield_values2(0, 0);
+}
 
 static VALUE
 grep_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, args))
@@ -60,7 +80,7 @@ grep_iter_i(RB_BLOCK_CALL_FUNC_ARGLIST(i https://github.com/ruby/ruby/blob/trunk/ruby_2_4/enum.c#L80
     ENUM_WANT_SVALUE();
 
     if (RTEST(rb_funcall(memo->v1, id_eqq, 1, i)) == RTEST(memo->u3.value)) {
-	rb_ary_push(memo->v2, rb_yield(i));
+	rb_ary_push(memo->v2, enum_yield(argc, i));
     }
     return Qnil;
 }
@@ -138,7 +158,7 @@ count_iter_i(RB_BLOCK_CALL_FUNC_ARGLIST( https://github.com/ruby/ruby/blob/trunk/ruby_2_4/enum.c#L158
 {
     struct MEMO *memo = MEMO_CAST(memop);
 
-    if (RTEST(enum_yield(argc, argv))) {
+    if (RTEST(rb_yield_values2(argc, argv))) {
 	memo->u3.cnt++;
     }
     return Qnil;
@@ -204,7 +224,7 @@ find_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, mem https://github.com/ruby/ruby/blob/trunk/ruby_2_4/enum.c#L224
 {
     ENUM_WANT_SVALUE();
 
-    if (RTEST(rb_yield(i))) {
+    if (RTEST(enum_yield(argc, i))) {
 	struct MEMO *memo = MEMO_CAST(memop);
 	MEMO_V1_SET(memo, i);
 	memo->u3.cnt = 1;
@@ -276,7 +296,7 @@ find_index_iter_i(RB_BLOCK_CALL_FUNC_ARG https://github.com/ruby/ruby/blob/trunk/ruby_2_4/enum.c#L296
 {
     struct MEMO *memo = MEMO_CAST(memop);
 
-    if (RTEST(enum_yield(argc, argv))) {
+    if (RTEST(rb_yield_values2(argc, argv))) {
 	MEMO_V1_SET(memo, UINT2NUM(memo->u3.cnt));
 	rb_iter_break();
     }
@@ -332,7 +352,7 @@ find_all_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, https://github.com/ruby/ruby/blob/trunk/ruby_2_4/enum.c#L352
 {
     ENUM_WANT_SVALUE();
 
-    if (RTEST(rb_yield(i))) {
+    if (RTEST(enum_yield(argc, i))) {
 	rb_ary_push(ary, i);
     }
     return Qnil;
@@ -402,7 +422,7 @@ reject_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, a https://github.com/ruby/ruby/blob/trunk/ruby_2_4/enum.c#L422
 {
     ENUM_WANT_SVALUE();
 
-    if (!RTEST(rb_yield(i))) {
+    if (!RTEST(enum_yield(argc, i))) {
 	rb_ary_push(ary, i);
     }
     return Qnil;
@@ -441,7 +461,7 @@ enum_reject(VALUE obj) https://github.com/ruby/ruby/blob/trunk/ruby_2_4/enum.c#L461
 static VALUE
 collect_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, ary))
 {
-    rb_ary_push(ary, enum_yield(argc, argv));
+    rb_ary_push(ary, rb_yield_values2(argc, argv));
 
     return Qnil;
 }
@@ -490,7 +510,7 @@ flat_map_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, https://github.com/ruby/ruby/blob/trunk/ruby_2_4/enum.c#L510
 {
     VALUE tmp;
 
-    i = enum_yield(argc, argv);
+    i = rb_yield_values2(argc, argv);
     tmp = rb_check_array_type(i);
 
     if (NIL_P(tmp)) {
@@ -787,7 +807,7 @@ partition_i(RB_BLOCK_CALL_FUNC_ARGLIST(i https://github.com/ruby/ruby/blob/trunk/ruby_2_4/enum.c#L807
     VALUE ary;
     ENUM_WANT_SVALUE();
 
-    if (RTEST(rb_yield(i))) {
+    if (RTEST(enum_yield(argc, i))) {
 	ary = memo->v1;
     }
     else {
@@ -833,7 +853,7 @@ group_by_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, https://github.com/ruby/ruby/blob/trunk/ruby_2_4/enum.c#L853
 
     ENUM_WANT_SVALUE();
 
-    group = rb_yield(i);
+    group = enum_yield(argc, i);
     values = rb_hash_aref(hash, group);
     if (!RB_TYPE_P(values, T_ARRAY)) {
 	values = rb_ary_new3(1, i);
@@ -967,7 +987,7 @@ sort_by_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, https://github.com/ruby/ruby/blob/trunk/ruby_2_4/enum.c#L987
 
     ENUM_WANT_SVALUE();
 
-    v = rb_yield(i);
+    v = enum_yield(argc, i);
 
     if (RBASIC(ary)->klass) {
 	rb_raise(rb_eRuntimeError, "sort_by reentered");
@@ -1141,7 +1161,7 @@ name##_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, m https://github.com/ruby/ruby/blob/trunk/ruby_2_4/enum.c#L1161
 static VALUE \
 name##_iter_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, memo)) \
 { \
-    return enum_##name##_func(enum_yield(argc, argv), MEMO_CAST(memo));	\
+    return enum_##name##_func(rb_yield_values2(argc, argv), MEMO_CAST(memo));	\
 } \
 \
 static VALUE \
@@ -1360,7 +1380,7 @@ nmin_i(VALUE i, VALUE *_data, int argc, https://github.com/ruby/ruby/blob/trunk/ruby_2_4/enum.c#L1380
     ENUM_WANT_SVALUE();
 
     if (data->by)
-	cmpv = rb_yield(i);
+	cmpv = enum_yield(argc, i);
     else
 	cmpv = i;
 
@@ -1856,7 +1876,7 @@ min_by_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, a https://github.com/ruby/ruby/blob/trunk/ruby_2_4/enum.c#L1876
 
     ENUM_WANT_SVALUE();
 
-    v = rb_yield(i);
+    v = enum_yield(argc, i);
     if (memo->v1 == Qundef) {
 	MEMO_V1_SET(memo, v);
 	MEMO_V2_SET(memo, i);
@@ -1917,7 +1937,7 @@ max_by_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, a https://github.com/ruby/ruby/blob/trunk/ruby_2_4/enum.c#L1937
 
     ENUM_WANT_SVALUE();
 
-    v = rb_yield(i);
+    v = enum_yield(argc, i);
     if (memo->v1 == Qundef) {
 	MEMO_V1_SET(memo, v);
 	MEMO_V2_SET(memo, i);
@@ -2054,7 +2074,7 @@ minmax_by_i(RB_BLOCK_CALL_FUNC_ARGLIST(i https://github.com/ruby/ruby/blob/trunk/ruby_2_4/enum.c#L2074
 
     ENUM_WANT_SVALUE();
 
-    vi = rb_yield(i);
+    vi = enum_yield(argc, i);
 
     if (memo->last_bv == Qundef) {
         memo->last_bv = vi;
@@ -2237,7 +2257,7 @@ static VALUE https://github.com/ruby/ruby/blob/trunk/ruby_2_4/enum.c#L2257
 each_val_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, p))
 {
     ENUM_WANT_SVALUE();
-    rb_yield(i);
+    enum_yield(argc, i);
     return Qnil;
 }
 
@@ -2484,7 +2504,7 @@ zip_ary(RB_BLOCK_CALL_FUNC_ARGLIST(val, https://github.com/ruby/ruby/blob/trunk/ruby_2_4/enum.c#L2504
 	}
     }
     if (NIL_P(result)) {
-	rb_yield(tmp);
+	enum_yield_array(tmp);
     }
     else {
 	rb_ary_push(result, tmp);
@@ -2535,7 +2555,7 @@ zip_i(RB_BLOCK_CALL_FUNC_ARGLIST(val, me https://github.com/ruby/ruby/blob/trunk/ruby_2_4/enum.c#L2555
 	}
     }
     if (NIL_P(result)) {
-	rb_yield(tmp);
+	enum_yield_array(tmp);
     }
     else {
 	rb_ary_push(result, tmp);
@@ -2657,7 +2677,7 @@ enum_take(VALUE obj, VALUE n) https://github.com/ruby/ruby/blob/trunk/ruby_2_4/enum.c#L2677
 static VALUE
 take_while_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, ary))
 {
-    if (!RTEST(enum_yield(argc, argv))) rb_iter_break();
+    if (!RTEST(rb_yield_values2(argc, argv))) rb_iter_break();
     rb_ary_push(ary, rb_enum_values_pack(argc, argv));
     return Qnil;
 }
@@ -2737,7 +2757,7 @@ drop_while_i(RB_BLOCK_CALL_FUNC_ARGLIST( https://github.com/ruby/ruby/blob/trunk/ruby_2_4/enum.c#L2757
     struct MEMO *memo = MEMO_CAST(args);
     ENUM_WANT_SVALUE();
 
-    if (!memo->u3.state && !RTEST(rb_yield(i))) {
+    if (!memo->u3.state && !RTEST(enum_yield(argc, i))) {
 	memo->u3.state = TRUE;
     }
     if (memo->u3.state) {
@@ -2780,8 +2800,8 @@ cycle_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, ar https://github.com/ruby/ruby/blob/trunk/ruby_2_4/enum.c#L2800
 {
     ENUM_WANT_SVALUE();
 
-    rb_ary_push(ary, i);
-    rb_yield(i);
+    rb_ary_push(ary, argc > 1 ? i : rb_ary_new_from_values(argc, argv));
+    enum_yield(argc, i);
     return Qnil;
 }
 
@@ -2848,7 +2868,7 @@ enum_cycle(int argc, VALUE *argv, VALUE https://github.com/ruby/ruby/blob/trunk/ruby_2_4/enum.c#L2868
     if (len == 0) return Qnil;
     while (n < 0 || 0 < --n) {
         for (i=0; i<len; i++) {
-            rb_yield(RARRAY_AREF(ary, i));
+	    enum_yield_array(RARRAY_AREF(ary, i));
         }
     }
     return Qnil;
Index: ruby_2_4/test/ruby/test_yield.rb
===================================================================
--- ruby_2_4/test/ruby/test_yield.rb	(revision 58044)
+++ ruby_2_4/test/ruby/test_yield.rb	(revision 58045)
@@ -245,7 +245,7 @@ class TestRubyYieldGen < Test::Unit::Tes https://github.com/ruby/ruby/blob/trunk/ruby_2_4/test/ruby/test_yield.rb#L245
           throw :emuerror, ArgumentError
         end
       else
-        if args.length != params.length and !(args.length == 1 and Array === args[0] and args[0].length == params.length)
+        if args.length != params.length
           throw :emuerror, ArgumentError
         end
       end
Index: ruby_2_4/test/ruby/test_lambda.rb
===================================================================
--- ruby_2_4/test/ruby/test_lambda.rb	(revision 58044)
+++ ruby_2_4/test/ruby/test_lambda.rb	(revision 58045)
@@ -31,8 +31,10 @@ class TestLambdaParameters < Test::Unit: https://github.com/ruby/ruby/blob/trunk/ruby_2_4/test/ruby/test_lambda.rb#L31
     bug9605 = '[ruby-core:61468] [Bug #9605]'
     assert_nothing_raised(ArgumentError, bug9605) {1.times(&->(n){ a += 1 })}
     assert_equal(3, a, bug9605)
-    assert_nothing_raised(ArgumentError, bug9605) {a = [[1, 2]].map(&->(x, y) {x+y})}
-    assert_equal([3], a, bug9605)
+    assert_nothing_raised(ArgumentError, bug9605) {
+      a = %w(Hi there how are you).each_with_index.detect(&->(w, i) {w.length == 3})
+    }
+    assert_equal(["how", 2], a, bug9605)
   end
 
   def test_call_rest_args
@@ -99,29 +101,9 @@ class TestLambdaParameters < Test::Unit: https://github.com/ruby/ruby/blob/trunk/ruby_2_4/test/ruby/test_lambda.rb#L101
     assert_equal(:ok, x, bug13090)
   end
 
-  def yield_1(arg)
-    yield arg
-  end
-
-  tap do |;bug9605, expected, result|
-    bug9605 = '[ruby-core:65887] [Bug #9605] arity check should be relaxed'
-    expected = [1,2,3]
-
-    [
-      ["array",  expected],
-      ["to_ary", Struct.new(:to_ary).new(expected)],
-    ].product \
-    [
-      ["proc",   proc {|a, b, c| [a, b, c]}],
-      ["lambda", lambda {|a, b, c| [a, b, c]}],
-    ] do
-      |(vtype, val), (btype, block)|
-      define_method("test_yield_relaxed(#{vtype},&#{btype})") do
-        result = assert_nothing_raised(ArgumentError, bug9605) {
-          break yield_1(val, &block)
-        }
-        assert_equal(expected, result, bug9605)
-      end
+  def test_arity_error
+    assert_raise(ArgumentError, '[Bug #12705]') do
+      [1, 2].tap(&lambda {|a, b|})
     end
   end
 
Index: ruby_2_4/version.h
===================================================================
--- ruby_2_4/version.h	(revision 58044)
+++ ruby_2_4/version.h	(revision 58045)
@@ -1,10 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_4/version.h#L1
 #define RUBY_VERSION "2.4.0"
-#define RUBY_RELEASE_DATE "2017-03-19"
-#define RUBY_PATCHLEVEL 107
+#define RUBY_RELEASE_DATE "2017-03-21"
+#define RUBY_PATCHLEVEL 108
 
 #define RUBY_RELEASE_YEAR 2017
 #define RUBY_RELEASE_MONTH 3
-#define RUBY_RELEASE_DAY 19
+#define RUBY_RELEASE_DAY 21
 
 #include "ruby/version.h"
 
Index: ruby_2_4/vm_args.c
===================================================================
--- ruby_2_4/vm_args.c	(revision 58044)
+++ ruby_2_4/vm_args.c	(revision 58045)
@@ -596,13 +596,7 @@ setup_parameters_complex(rb_thread_t * c https://github.com/ruby/ruby/blob/trunk/ruby_2_4/vm_args.c#L596
 	}
 	break;
       case arg_setup_lambda:
-	if (given_argc == 1 &&
-	    given_argc != iseq->body->param.lead_num &&
-	    !iseq->body->param.flags.has_opt &&
-	    !iseq->body->param.flags.has_rest &&
-	    args_check_block_arg0(args, th)) {
-	    given_argc = RARRAY_LENINT(args->rest);
-	}
+	break;
     }
 
     /* argc check */
Index: ruby_2_4/internal.h
===================================================================
--- ruby_2_4/internal.h	(revision 58044)
+++ ruby_2_4/internal.h	(revision 58045)
@@ -1593,6 +1593,7 @@ VALUE rb_check_funcall_with_hook(VALUE r https://github.com/ruby/ruby/blob/trunk/ruby_2_4/internal.h#L1593
 VALUE rb_check_funcall_default(VALUE, ID, int, const VALUE *, VALUE);
 VALUE rb_catch_protect(VALUE t, rb_block_call_func *func, VALUE data, int *stateptr);
 VALUE rb_yield_1(VALUE val);
+VALUE rb_yield_lambda(VALUE values);
 
 /* vm_insnhelper.c */
 VALUE rb_equal_opt(VALUE obj1, VALUE obj2);

Property changes on: ruby_2_4
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r57192,57464,58016,58018-58019


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]