diff --git a/ChangeLog b/ChangeLog index 7519787c35..8cf51c866b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Thu Mar 20 00:13:59 2008 Nobuyoshi Nakada + + * io.c (argf_tell, argf_seek_m, argf_set_pos, argf_rewind, + argf_fileno, argf_to_io, argf_eofl, argf_getc, argf_getbyte, + argf_readchar, argf_readbyte, argf_each_line): use receiver. + Wed Mar 19 23:52:41 2008 Nobuyoshi Nakada * io.c (rb_io_putc, rb_io_puts): ouput directly if the reciever is diff --git a/io.c b/io.c index cd1c590c41..06393f1d2f 100644 --- a/io.c +++ b/io.c @@ -6210,7 +6210,7 @@ argf_set_encoding(int argc, VALUE *argv, VALUE argf) } static VALUE -argf_tell(void) +argf_tell(VALUE argf) { if (!next_argv()) { rb_raise(rb_eArgError, "no stream to tell"); @@ -6220,7 +6220,7 @@ argf_tell(void) } static VALUE -argf_seek_m(int argc, VALUE *argv, VALUE self) +argf_seek_m(int argc, VALUE *argv, VALUE argf) { if (!next_argv()) { rb_raise(rb_eArgError, "no stream to seek"); @@ -6230,7 +6230,7 @@ argf_seek_m(int argc, VALUE *argv, VALUE self) } static VALUE -argf_set_pos(VALUE self, VALUE offset) +argf_set_pos(VALUE argf, VALUE offset) { if (!next_argv()) { rb_raise(rb_eArgError, "no stream to set position"); @@ -6240,7 +6240,7 @@ argf_set_pos(VALUE self, VALUE offset) } static VALUE -argf_rewind(void) +argf_rewind(VALUE argf) { if (!next_argv()) { rb_raise(rb_eArgError, "no stream to rewind"); @@ -6250,7 +6250,7 @@ argf_rewind(void) } static VALUE -argf_fileno(void) +argf_fileno(VALUE argf) { if (!next_argv()) { rb_raise(rb_eArgError, "no stream"); @@ -6260,7 +6260,7 @@ argf_fileno(void) } static VALUE -argf_to_io(void) +argf_to_io(VALUE argf) { next_argv(); ARGF_FORWARD(0, 0); @@ -6268,7 +6268,7 @@ argf_to_io(void) } static VALUE -argf_eof(void) +argf_eof(VALUE argf) { if (current_file) { if (init_p == 0) return Qtrue; @@ -6381,7 +6381,7 @@ argf_readpartial(int argc, VALUE *argv, VALUE argf) } static VALUE -argf_getc(void) +argf_getc(VALUE argf) { VALUE ch; @@ -6403,7 +6403,7 @@ argf_getc(void) } static VALUE -argf_getbyte(void) +argf_getbyte(VALUE argf) { VALUE ch; @@ -6425,7 +6425,7 @@ argf_getbyte(void) } static VALUE -argf_readchar(void) +argf_readchar(VALUE argf) { VALUE ch; @@ -6447,12 +6447,12 @@ argf_readchar(void) } static VALUE -argf_readbyte(void) +argf_readbyte(VALUE argf) { VALUE c; NEXT_ARGF_FORWARD(0, 0); - c = argf_getbyte(); + c = argf_getbyte(argf); if (NIL_P(c)) { rb_eof_error(); } @@ -6460,15 +6460,15 @@ argf_readbyte(void) } static VALUE -argf_each_line(int argc, VALUE *argv, VALUE self) +argf_each_line(int argc, VALUE *argv, VALUE argf) { - RETURN_ENUMERATOR(self, argc, argv); + RETURN_ENUMERATOR(argf, argc, argv); for (;;) { if (!next_argv()) return Qnil; rb_block_call(current_file, rb_intern("each_line"), 0, 0, rb_yield, 0); next_p = 1; } - return self; + return argf; } static VALUE diff --git a/version.h b/version.h index 9c2f4f70d1..ec659f21e3 100644 --- a/version.h +++ b/version.h @@ -1,7 +1,7 @@ #define RUBY_VERSION "1.9.0" -#define RUBY_RELEASE_DATE "2008-03-19" +#define RUBY_RELEASE_DATE "2008-03-20" #define RUBY_VERSION_CODE 190 -#define RUBY_RELEASE_CODE 20080319 +#define RUBY_RELEASE_CODE 20080320 #define RUBY_PATCHLEVEL 0 #define RUBY_VERSION_MAJOR 1 @@ -9,7 +9,7 @@ #define RUBY_VERSION_TEENY 0 #define RUBY_RELEASE_YEAR 2008 #define RUBY_RELEASE_MONTH 3 -#define RUBY_RELEASE_DAY 19 +#define RUBY_RELEASE_DAY 20 #ifdef RUBY_EXTERN RUBY_EXTERN const char ruby_version[];