diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-03-19 15:14:01 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-03-19 15:14:01 +0000 |
commit | d042d575b2f46216a205916dd246cc7d02d5c36b (patch) | |
tree | 18b9ae8c67005fcd8a6e49f1fcc412a4744a7812 | |
parent | d7ae6db23f1a2763e426bd01a2e109c2f10c798e (diff) | |
download | ruby-d042d575b2f46216a205916dd246cc7d02d5c36b.tar.gz ruby-d042d575b2f46216a205916dd246cc7d02d5c36b.tar.xz ruby-d042d575b2f46216a205916dd246cc7d02d5c36b.zip |
* 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.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | io.c | 30 | ||||
-rw-r--r-- | version.h | 6 |
3 files changed, 24 insertions, 18 deletions
@@ -1,3 +1,9 @@ +Thu Mar 20 00:13:59 2008 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * 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 <nobu@ruby-lang.org> * io.c (rb_io_putc, rb_io_puts): ouput directly if the reciever is @@ -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 @@ -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[]; |