Project

General

Profile

Bug #15188 ยป ripper-assign-unused-15188.patch

jeremyevans0 (Jeremy Evans), 08/27/2019 07:00 PM

View differences:

parse.y
11585 11585
    if (cnt != local->vars->pos) {
11586 11586
	rb_parser_fatal(p, "local->used->pos != local->vars->pos");
11587 11587
    }
11588
#ifndef RIPPER
11588 11589
    for (i = 0; i < cnt; ++i) {
11589 11590
	if (!v[i] || (u[i] & LVAR_USED)) continue;
11590 11591
	if (is_private_local_id(v[i])) continue;
11591 11592
	rb_warn1L((int)u[i], "assigned but unused variable - %"PRIsWARN, rb_id2str(v[i]));
11592 11593
    }
11594
#endif
11593 11595
}
11594 11596

  
11595 11597
static void
11596
-