Support for more than 15 keyword arguments
@@ -87,10 +87,12 @@ static void send_by_name( struct VM *vm, mrbc_sym sym_id, int a, int c )
// Convert keyword argument to hash.
if( karg ) {
+ narg++;
+ if( karg != CALL_MAXARGS ) {
mrbc_value h = mrbc_hash_new( vm, karg );
if( !h.hash ) return; // ENOMEM
- mrbc_value *r1 = recv + narg + 1;
+ mrbc_value *r1 = recv + narg;
memcpy( h.hash->data, r1, sizeof(mrbc_value) * karg * 2 );
h.hash->n_stored = karg * 2;
@@ -98,7 +100,7 @@ static void send_by_name( struct VM *vm, mrbc_sym sym_id, int a, int c )
memset( r1 + 2, 0, sizeof(mrbc_value) * (karg * 2 - 1) );
*r1++ = h;
*r1 = block;
- narg++;
+ }
}
// is not have block
