Project

General

Profile

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

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

View differences:

parse.y
if (cnt != local->vars->pos) {
rb_parser_fatal(p, "local->used->pos != local->vars->pos");
}
#ifndef RIPPER
for (i = 0; i < cnt; ++i) {
if (!v[i] || (u[i] & LVAR_USED)) continue;
if (is_private_local_id(v[i])) continue;
rb_warn1L((int)u[i], "assigned but unused variable - %"PRIsWARN, rb_id2str(v[i]));
}
#endif
}
static void
    (1-1/1)