e$B1sF#$H?=$7$^$9!#e(B
1.9 e$B$Ge(B when e$B@a$Ke(B *[], 1 e$B$J$I$H=q$/$HMn$A$^$9!#e(B
$ ./ruby -e ‘case 1 when *[], 1; end’
– control frame ----------
c:0001 p:---- s:0001 b:-001 l:000000 d:000000 ------
– backtrace of native function call (Use addr2line) –
0x80e8065
0x8105bd3
0x8105c9b
0x81142d0
0x811725e
0x80dc4e2
0x80dc5b6
0x8059ec4
0x805de00
0x8057be0
0xb7df5ea8
0x8057b01
[BUG] NODE_CASAE: unknown node (NODE_ARGSPUSH)
ruby 1.9.0 (2007-11-23) [i686-linux]
e$B%"%!<%H$7$^$7$?e(B
e$BB?J,$3$&$G$7$g$&$+!#$D$$$G$Ke(B typo e$B$bD>$7$F$^$9!#e(B
Index: compile.c
— compile.c (revision 14007)
+++ compile.c (working copy)
@@ -2671,11 +2671,11 @@
if (nd_type(vals) == NODE_ARRAY) {
special_literals = when_vals(iseq, cond_seq, vals,
l1, special_literals);
}
-
else if (nd_type(vals) == NODE_SPLAT || nd_type(vals)
== NODE_ARGSCAT) {
-
else if (nd_type(vals) == NODE_SPLAT || nd_type(vals)
== NODE_ARGSCAT || nd_type(vals) == NODE_ARGSPUSH) {
NODE *val = vals->nd_head;
special_literals = 0;
-
if (nd_type(vals) == NODE_ARGSCAT) {
-
if (nd_type(vals) == NODE_ARGSCAT || nd_type(vals)
== NODE_ARGSPUSH) {
when_vals(iseq, cond_seq, vals->nd_head, l1, 0);
val = vals->nd_body;
}
@@ -2685,12 +2685,12 @@
ADD_INSNL(cond_seq, nd_line(val), branchif, l1);
}
else {
-
rb_bug("NODE_CASAE: unknown node (%s)",
-
rb_bug("NODE_CASE: unknown node (%s)", ruby_node_name(nd_type(vals))); } } else {
-
rb_bug("NODE_CASAE: must be NODE_ARRAY, but 0");
-
rb_bug("NODE_CASE: must be NODE_ARRAY, but 0"); } node = node->nd_next;
@@ -2753,10 +2753,10 @@
vals = vals->nd_next;
}
}
-
else if (nd_type(vals) == NODE_SPLAT || nd_type(vals) ==
NODE_ARGSCAT) {
-
else if (nd_type(vals) == NODE_SPLAT || nd_type(vals) ==
NODE_ARGSCAT || nd_type(vals) == NODE_ARGSPUSH) {
NODE *val = vals->nd_head;
-
if (nd_type(vals) == NODE_ARGSCAT) {
-
if (nd_type(vals) == NODE_ARGSCAT || nd_type(vals) ==
NODE_ARGSPUSH) {
NODE *vs = vals->nd_head;
val = vals->nd_body;