まつもと ゆきひろです

In message "[ruby-list:2137] [BUG] for line in $<"
    on 97/02/14, Keiju ISHITSUKA <keiju / shljapan.co.jp> writes:
|
|けいじゅ@SHLジャパンです. 
|
|  for line in $<
|    print line
|  end
|
|
|
|line.rb:18: [BUG] Segmentation fault
|IOT trap
|
|します(;_;

すんません.

--- io.c~	Sun Feb  9 00:40:13 1997
+++ io.c	Fri Feb 14 23:38:30 1997
@@ -1951,7 +1951,7 @@
     rb_define_method(cIO, "printf", io_printf, -1);
 
     rb_define_method(cIO, "each",  io_each_line, -1);
-    rb_define_method(cIO, "each_line",  io_each_line, 0);
+    rb_define_method(cIO, "each_line",  io_each_line, -1);
     rb_define_method(cIO, "each_byte",  io_each_byte, 0);
 
     rb_define_method(cIO, "syswrite", io_syswrite, 1);
@@ -2007,7 +2007,7 @@
     rb_define_readonly_variable("$ARGF", &argf);
     rb_define_global_const("ARGF", argf);
 
-    rb_define_singleton_method(argf, "each",  arg_each_line, 0);
+    rb_define_singleton_method(argf, "each",  arg_each_line, -1);
     rb_define_singleton_method(argf, "each_line",  arg_each_line, -1);
     rb_define_singleton_method(argf, "each_byte",  arg_each_byte, 0);