Commit 6f2efebb authored by mimaki's avatar mimaki

Merge commit '7e7f1b2f' into stable

parents f29924c8 7e7f1b2f
# Authors of mruby (mruby developers) # Authors of mruby (mruby developers)
## The List of Contributors sorted by number of commits (as of 2021-11-22 01cadd3) ## The List of Contributors sorted by number of commits (as of 2022-01-10 69b1667)
7874 Yukihiro "Matz" Matsumoto (@matz)* 7956 Yukihiro "Matz" Matsumoto (@matz)*
586 KOBAYASHI Shuji (@shuujii) 586 KOBAYASHI Shuji (@shuujii)
376 Daniel Bovensiepen (@bovi) 376 Daniel Bovensiepen (@bovi)
346 Takeshi Watanabe (@take-cheeze)* 346 Takeshi Watanabe (@take-cheeze)*
342 dearblue (@dearblue)*
334 Masaki Muranaka (@monaka) 334 Masaki Muranaka (@monaka)
321 dearblue (@dearblue)*
298 Tomoyuki Sahara (@tsahara)* 298 Tomoyuki Sahara (@tsahara)*
234 Jun Hiroe (@suzukaze) 234 Jun Hiroe (@suzukaze)
219 Cremno (@cremno)* 219 Cremno (@cremno)*
...@@ -19,13 +19,13 @@ ...@@ -19,13 +19,13 @@
80 Masamitsu MURASE (@masamitsu-murase) 80 Masamitsu MURASE (@masamitsu-murase)
74 Yuichiro MASUI (@masuidrive) 74 Yuichiro MASUI (@masuidrive)
71 Tatsuhiko Kubo (@cubicdaiya)* 71 Tatsuhiko Kubo (@cubicdaiya)*
67 Hiroshi Mimaki (@mimaki)* 68 Hiroshi Mimaki (@mimaki)*
63 Akira Yumiyama (@akiray03)* 63 Akira Yumiyama (@akiray03)*
62 Paolo Bosetti (@pbosetti)* 62 Paolo Bosetti (@pbosetti)*
59 Kurebayashi, Takahiro (@crimsonwoods)* 59 Kurebayashi, Takahiro (@crimsonwoods)*
56 h2so5 (@h2so5) 56 h2so5 (@h2so5)
52 Ralph Desir (@Mav7)* 52 Ralph Desir (@Mav7)*
47 John Bampton (@jbampton) 49 John Bampton (@jbampton)
45 Rory O'Connell (@RoryO)* 45 Rory O'Connell (@RoryO)*
43 Yuichiro Kaneko (@yui-knk)+ 43 Yuichiro Kaneko (@yui-knk)+
42 fleuria (@flaneur2020) 42 fleuria (@flaneur2020)
......
...@@ -712,9 +712,6 @@ new_cvar(parser_state *p, mrb_sym sym) ...@@ -712,9 +712,6 @@ new_cvar(parser_state *p, mrb_sym sym)
static node* static node*
new_nvar(parser_state *p, int num) new_nvar(parser_state *p, int num)
{ {
int nvars = intn(p->nvars->car);
p->nvars->car = nint(nvars > num ? nvars : num);
return cons((node*)NODE_NVAR, nint(num)); return cons((node*)NODE_NVAR, nint(num));
} }
...@@ -6425,12 +6422,17 @@ parser_yylex(parser_state *p) ...@@ -6425,12 +6422,17 @@ parser_yylex(parser_state *p)
nvars = nvars->cdr; nvars = nvars->cdr;
} }
nvar = intn(p->nvars->car); nvar = intn(p->nvars->car);
if (nvar == -1) { if (nvar != -2) { /* numbered parameters never appear on toplevel */
yywarning(p, "numbered parameter used in inner block"); if (nvar == -1) {
yywarning(p, "numbered parameter used in inner block");
}
else {
p->nvars->car = nint(nvar > n ? nvar : n);
}
pylval.num = n;
p->lstate = EXPR_END;
return tNUMPARAM;
} }
pylval.num = n;
p->lstate = EXPR_END;
return tNUMPARAM;
} }
} }
/* fall through */ /* fall through */
......
This diff is collapsed.
/* /*
** dump.c - mruby binary dumper (mrbc binary format) ** cdump.c - mruby binary dumper (in C)
** **
** See Copyright Notice in mruby.h ** See Copyright Notice in mruby.h
*/ */
......
/* /*
** cdump.c - mruby binary dumper (in C) ** dump.c - mruby binary dumper (mrbc binary format)
** **
** See Copyright Notice in mruby.h ** See Copyright Notice in mruby.h
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment