e$B1sF#$H?=$7$^$9!#e(B
1.9 e$B$G0J2<$N$h$&$K$9$k$HMn$A$^$9!#e(B
$ ./ruby -e ‘0…$1=0’
Can’t set variable $1
– control frame ----------
c:0001 p:---- s:0001 b:-001 l:000000 d:000000 ------
– backtrace of native function call (Use addr2line) –
0x80dad25
0x80f3f90
0x80b2620
0xffffe420
0x809108f
0x809137f
0x809140e
0x80b16c1
0x80b1a57
0x805c5d4
0x8056d8a
0xb7da3ea8
0x8056cc1
[BUG] Segmentation fault
ruby 1.9.0 (2007-07-03) [i686-linux]
e$B%"%!<%H$7$^$7$?e(B (core dumped)
e$BB>$K$b0J2<$N$h$&$J$b$N$G$bMn$A$^$9!#e(B
0…$1+=0
0…A::A+=0
0…::A+=0
[ruby-dev:31085] e$B$de(B [ruby-dev:31100] e$B$bF1$8860x$G$9$,!"e(B
e$B$3$l$i$O$R$g$C$H$7$Fe(B arg tDOT2 arg (e$B$^$?$Oe(B value_expr)
e$B$H$+$NJ}$Ge(B
e$BBP1~$9$Y$-$3$H$G$7$g$&$+!#e(B
Index: parse.y
— parse.y (revision 12681)
+++ parse.y (working copy)
@@ -1884,6 +1884,10 @@
| arg tDOT2 arg
{
/%%%/
-
if(!$1 || !$3) {
-
$$ = 0;
-
}
-
else { value_expr($1); value_expr($3); if (nd_type($1) == NODE_LIT && FIXNUM_P($1->nd_lit) &&
@@ -1894,6 +1898,7 @@
else {
$$ = NEW_DOT2($1, $3);
}
-
} /*% $$ = dispatch2(dot2, $1, $3); %*/
@@ -1901,6 +1906,10 @@
| arg tDOT3 arg
{
/%%%/
-
if(!$1 || !$3) {
-
$$ = 0;
-
}
-
else { value_expr($1); value_expr($3); if (nd_type($1) == NODE_LIT && FIXNUM_P($1->nd_lit) &&
@@ -1911,6 +1920,7 @@
else {
$$ = NEW_DOT3($1, $3);
}
-
} /*% $$ = dispatch2(dot3, $1, $3); %*/