[前][次][番号順一覧][スレッド一覧]

ruby-changes:4323

From: ko1@a...
Date: Thu, 20 Mar 2008 21:47:01 +0900 (JST)
Subject: [ruby-changes:4323] nobu - Ruby:r15813 (trunk): * io.c (argf_getline): use receiver.

nobu	2008-03-20 21:46:35 +0900 (Thu, 20 Mar 2008)

  New Revision: 15813

  Modified files:
    trunk/ChangeLog
    trunk/io.c

  Log:
    * io.c (argf_getline): use receiver.


  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=15813&r2=15812&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/io.c?r1=15813&r2=15812&diff_format=u

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 15812)
+++ ChangeLog	(revision 15813)
@@ -1,3 +1,7 @@
+Thu Mar 20 21:46:33 2008  Nobuyoshi Nakada  <nobu@r...>
+
+	* io.c (argf_getline): use receiver.
+
 Thu Mar 20 21:20:19 2008  Tadayoshi Funaba  <tadf@d...>
 
 	* rational.c: some improvements (include Shin-ichiro HARA's
Index: io.c
===================================================================
--- io.c	(revision 15812)
+++ io.c	(revision 15813)
@@ -5149,7 +5149,7 @@
 }
 
 static VALUE
-argf_getline(int argc, VALUE *argv)
+argf_getline(int argc, VALUE *argv, VALUE argf)
 {
     VALUE line;
 
@@ -5232,7 +5232,7 @@
 {
     VALUE line;
 
-    line = argf_getline(argc, argv);
+    line = argf_getline(argc, argv, argf);
     rb_lastline_set(line);
     return line;
 }
@@ -5304,7 +5304,7 @@
     VALUE line, ary;
 
     ary = rb_ary_new();
-    while (!NIL_P(line = argf_getline(argc, argv))) {
+    while (!NIL_P(line = argf_getline(argc, argv, argf))) {
 	rb_ary_push(ary, line);
     }
 
@@ -6883,6 +6883,7 @@
     rb_define_global_const("STDERR", rb_stderr);
 
     rb_cARGF = rb_class_new(rb_cObject);
+    rb_set_class_path(rb_cARGF, rb_cObject, "ARGF.class");
     rb_define_alloc_func(rb_cARGF, argf_alloc);
 
     rb_include_module(rb_cARGF, rb_mEnumerable);

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]