e$B1sF#$H?=$7$^$9!#e(B
1.8.6 e$B!"e(B1.9 e$B6&$K0J2<$N$h$&$K$9$k$HMn$A$^$9!#e(B
$ ./ruby -e ‘@0…0’
-e:1: `@0’ is not allowed as an instance variable name
-e:1: identifier @0 is not valid
-e:1: [BUG] Segmentation fault
ruby 1.8.6 (2007-06-29) [i686-linux]
e$B%"%!<%H$7$^$7$?e(B (core dumped)
e$B0J2<$N%Q%C%A$GMn$A$J$/$J$j$^$7$?!#e(B
Index: parse.y
— parse.y (revision 12667)
+++ parse.y (working copy)
@@ -4351,6 +4351,7 @@
else {
rb_compile_error("`@@%c’ is not allowed as a class variable name",
c);
}
-
}return 0;
if (!is_identchar©) {
pushback©;
e$B%F%9%H%1!<%9$O!"@5D>$I$3$K$I$&=q$1$P$$$$$N$+$o$+$i$s$G$9!#e(B
e$B$=$l$G$b4:$($F=q$/$J$ie(B sample/test.rb
e$B$K0J2<$rDI2C$G$7$g$&$+!#e(B
test_ok(nil == (begin eval “@0…0”; rescue Exception; nil end))
e$B$G$be(B test.rb e$BCf$N$I$NJU$j$K=q$1$P$$$$$N$+$o$+$j$^$;$s$7!"e(B
e$BB>$N%F%9%H$HHf$Y$F$bIb$$$F$$$k5$$,$7$^$9!#e(B