ruby-changes:5131
From: knu <ko1@a...>
Date: Tue, 27 May 2008 13:44:26 +0900 (JST)
Subject: [ruby-changes:5131] Ruby:r16626 (ruby_1_8): * io.c (Init_IO): Define {IO,ARGF}#{getbyte,readbyte}.
knu 2008-05-27 13:44:12 +0900 (Tue, 27 May 2008) New Revision: 16626 Modified files: branches/ruby_1_8/ChangeLog branches/ruby_1_8/NEWS branches/ruby_1_8/io.c Log: * io.c (Init_IO): Define {IO,ARGF}#{getbyte,readbyte}. http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/ChangeLog?r1=16626&r2=16625&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/io.c?r1=16626&r2=16625&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/NEWS?r1=16626&r2=16625&diff_format=u Index: ruby_1_8/NEWS =================================================================== --- ruby_1_8/NEWS (revision 16625) +++ ruby_1_8/NEWS (revision 16626) @@ -171,17 +171,24 @@ * IO#each * IO#each_line * IO#each_byte - * IO#lines - * IO#bytes * IO.foreach * ARGF.each * ARGF.each_line * ARGF.each_byte - * ARGF.lines - * ARGF.bytes Return an enumerator if no block is given. + * IO#bytes + * IO#getbyte + * IO#lines + * IO#readbyte + * ARGF.bytes + * ARGF.getbyte + * ARGF.lines + * ARGF.readbyte + + New methods. + * Method#receiver * Method#name * Method#owner Index: ruby_1_8/ChangeLog =================================================================== --- ruby_1_8/ChangeLog (revision 16625) +++ ruby_1_8/ChangeLog (revision 16626) @@ -1,3 +1,7 @@ +Tue May 27 13:38:51 2008 Akinori MUSHA <knu@i...> + + * io.c (Init_IO): Define {IO,ARGF}#{getbyte,readbyte}. + Tue May 27 13:26:15 2008 Akinori MUSHA <knu@i...> * ext/stringio/stringio.c (Init_stringio): Define #bytes and Index: ruby_1_8/io.c =================================================================== --- ruby_1_8/io.c (revision 16625) +++ ruby_1_8/io.c (revision 16626) @@ -5881,7 +5881,9 @@ rb_define_method(rb_cIO, "gets", rb_io_gets_m, -1); rb_define_method(rb_cIO, "readline", rb_io_readline, -1); rb_define_method(rb_cIO, "getc", rb_io_getc, 0); + rb_define_method(rb_cIO, "getbyte", rb_io_getc, 0); rb_define_method(rb_cIO, "readchar", rb_io_readchar, 0); + rb_define_method(rb_cIO, "readbyte", rb_io_readchar, 0); rb_define_method(rb_cIO, "ungetc",rb_io_ungetc, 1); rb_define_method(rb_cIO, "<<", rb_io_addstr, 1); rb_define_method(rb_cIO, "flush", rb_io_flush, 0); @@ -5943,8 +5945,8 @@ rb_define_singleton_method(argf, "each", argf_each_line, -1); rb_define_singleton_method(argf, "each_line", argf_each_line, -1); rb_define_singleton_method(argf, "each_byte", argf_each_byte, 0); - rb_define_singleton_method(argf, "lines", argf_lines, -1); - rb_define_singleton_method(argf, "bytes", argf_bytes, 0); + rb_define_singleton_method(argf, "lines", argf_each_line, -1); + rb_define_singleton_method(argf, "bytes", argf_each_byte, 0); rb_define_singleton_method(argf, "read", argf_read, -1); rb_define_singleton_method(argf, "readlines", rb_f_readlines, -1); @@ -5952,7 +5954,9 @@ rb_define_singleton_method(argf, "gets", rb_f_gets, -1); rb_define_singleton_method(argf, "readline", rb_f_readline, -1); rb_define_singleton_method(argf, "getc", argf_getc, 0); + rb_define_singleton_method(argf, "getbyte", argf_getc, 0); rb_define_singleton_method(argf, "readchar", argf_readchar, 0); + rb_define_singleton_method(argf, "readbyte", argf_readchar, 0); rb_define_singleton_method(argf, "tell", argf_tell, 0); rb_define_singleton_method(argf, "seek", argf_seek_m, -1); rb_define_singleton_method(argf, "rewind", argf_rewind, 0); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/