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…:"’
-e:1: unterminated string meets end of file
-e:1: empty symbol literal
-e:1: [BUG] Segmentation fault
ruby 1.8.6 (2007-06-26) [i686-linux]
e$B%"%!<%H$7$^$7$?e(B (core dumped)
e$B$H$j$"$($:0J2<$N%Q%C%Ae(B (ruby 1.8 e$BMQe(B)
e$B$GMn$A$J$/$J$j$^$7$?$,!"e(B
e$BA4A3$o$+$C$F$J$$$N$GE,Ev$K8+$F$/$@$5$$!#e(B
Index: parse.y
— parse.y (revision 12652)
+++ parse.y (working copy)
@@ -2142,11 +2142,13 @@
dsym : tSYMBEG xstring_contents tSTRING_END
{
lex_state = EXPR_END;
-
if (!($$ = $2)) {
-
if (!$2) {
-
$$ = NEW_NIL(); yyerror("empty symbol literal"); } else { VALUE lit;
-
$$ = $2; switch (nd_type($$)) { case NODE_DSTR: