@@ -601,7 +601,7 @@ rb_rational_plus(VALUE self, VALUE other)
601601 VALUE num = RRATIONAL (self )-> num ;
602602 VALUE den = RRATIONAL (self )-> den ;
603603
604- return f_addsub (self , num , den , other , ONE , idPLUS );
604+ return f_addsub (self , num , den , other , ONE , '+' );
605605 }
606606 else if (RB_TYPE_P (other , T_FLOAT )) {
607607 return f_add (f_to_f (self ), other );
@@ -830,11 +830,11 @@ ary_mean_variance(VALUE ary, VALUE *mean_ptr, VALUE *variance_ptr, size_t ddof)
830830static int
831831opt_population_p (VALUE opts )
832832{
833- ID kwargs = id_population ;
834833 VALUE population = Qfalse ;
835834
836835 if (!NIL_P (opts )) {
837836#ifdef HAVE_RB_GET_KWARGS
837+ ID kwargs = id_population ;
838838 rb_get_kwargs (opts , & kwargs , 0 , 1 , & population );
839839#else
840840 VALUE val = rb_hash_aref (opts , ID2SYM (id_population ));
@@ -1155,7 +1155,7 @@ enum_sum(int argc, VALUE* argv, VALUE obj)
11551155
11561156struct enum_mean_variance_memo {
11571157 int block_given ;
1158- long n ;
1158+ size_t n ;
11591159 double m , m2 , f , c ;
11601160};
11611161
@@ -1209,7 +1209,7 @@ enum_mean_variance_iter_i(RB_BLOCK_CALL_FUNC_ARGLIST(e, args))
12091209{
12101210 struct enum_mean_variance_memo * memo = (struct enum_mean_variance_memo * )args ;
12111211 ENUM_WANT_SVALUE ();
1212- mean_variance_iter (e , ( struct enum_mean_variance_memo * ) args );
1212+ mean_variance_iter (e , memo );
12131213 return Qnil ;
12141214}
12151215
0 commit comments