@0..0 dumps core

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

[email protected]$G$9!#e(B

e$B!!%F%9%[email protected]$O!"e(Bparse.y
e$B$O$h$/$o$+$i$J$$$N$GB>$N?M$rBT$D$3e(B
e$B$H$K$7$F!#e(B

Yusuke ENDOH wrote:

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

e$B!!$?$7$+$K!#e(B

e$B!!:#9M$($F$$$k$N$O!“e(Bbootstraptest/
e$B$K!”:#$?$/$5$s;XE&$7$F$$$?e(B
[email protected]$$$F$$$k%@%a$JNc$r=8$a$F!"!VF0$+$7$F$be(B segv/abort e$B$7$J$$$3e(B
e$B$H!W$r3NG’$9$k$?$a$N%U%!%$%k$b$7$/$O5-=R!Je(Btest_exec “program”
e$B!"$+$J$!!K$rMQ0U$7$F!"$=$3$K5-O?$7$F$*$/!"$H$$$&0F$G$9!#e(B

e$B!!:#EY!"$A$g$C$HMQ0U$7$F$_$^$9!#e(B

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs