@@ -678,10 +678,7 @@ num_exact(VALUE v)
678678 goto typeerror ;
679679
680680 default :
681- tmp = Qundef ;
682- if (rb_vm_respond_to (v , sel_to_r , true)) {
683- tmp = rb_vm_call (v , sel_to_r , 0 , NULL );
684- }
681+ tmp = rb_vm_check_call (v , sel_to_r , 0 , NULL );
685682 if (tmp != Qundef ) {
686683 if (rb_respond_to (v , rb_intern ("to_str" ))) goto typeerror ;
687684 v = tmp ;
@@ -1502,7 +1499,7 @@ calc_wday(int year, int month, int day)
15021499static VALUE
15031500guess_local_offset (struct vtm * vtm_utc , int * isdst_ret , const char * * zone_ret )
15041501{
1505- struct tm tm ;
1502+ struct tm tm = { 0 }; // avoid warning for gcc
15061503 long gmtoff ;
15071504 const char * zone ;
15081505 time_t t ;
@@ -2381,10 +2378,7 @@ time_timespec(VALUE num, int interval)
23812378
23822379 default :
23832380 i = INT2FIX (1 );
2384- ary = Qundef ;
2385- if (rb_vm_respond_to (num , sel_divmod , true)) {
2386- ary = rb_vm_call (num , sel_divmod , 1 , & i );
2387- }
2381+ ary = rb_vm_check_call (num , sel_divmod , 1 , & i );
23882382 if (ary != Qundef && !NIL_P (ary = rb_check_array_type (ary ))) {
23892383 i = rb_ary_entry (ary , 0 );
23902384 f = rb_ary_entry (ary , 1 );
0 commit comments