Ruby -ne ! dumps core

e$B1sF#$H?=$7$^$9!#e(B

1.9 e$B$G0J2<$N$h$&$K$9$k$HMn$A$^$9!#e(B

$ ./ruby -vne !
ruby 1.9.0 (2007-07-17 patchlevel 0) [i686-linux]
-e:1: syntax error, unexpected $end
– control frame ----------
c:0001 p:---- s:0001 b:-001 l:000000 d:000000 ------

– backtrace of native function call (Use addr2line) –
0x80dad35
0x80f34a3
0x80f356b
0x80b2660
0xffffe420
0x80b12dc
0x80b1b8b
0x805c534
0x8056c2a
0xb7dd3ea8
0x8056b61

[BUG] Segmentation fault
ruby 1.9.0 (2007-07-17) [i686-linux]

e$B%"%!<%H$7$^$7$?e(B (core dumped)

-n e$B$de(B -p e$B$G%Q!<%9<:GT$7$?$iMn$A$k$h$&$G$9!#e(B
e$B0J2<$N%Q%C%A$GMn$A$J$/$J$j$^$7$?!#e(B

Index: ruby.c

— ruby.c (revision 12809)
+++ ruby.c (working copy)
@@ -883,10 +883,10 @@
FL_UNSET(rb_load_path, FL_TAINT);
}

  • if (do_print) {
  • if (tree && do_print) {
    tree = rb_parser_append_print(parser, tree);
    }
  • if (do_loop) {
  • if (tree && do_loop) {
    tree = rb_parser_while_loop(parser, tree, do_line, do_split);
    }