summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-03-13 05:48:35 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-03-13 05:48:35 +0000
commitdfaeaa7f5396c9f6e146e884baf26a77d46ffb19 (patch)
treeba4f9495a33fe062cb3d17c6381b01bbd0fc8f14 /io.c
parent08aeee61b15fcbd31cd600ea09a1b7991bc82da7 (diff)
downloadruby-dfaeaa7f5396c9f6e146e884baf26a77d46ffb19.tar.gz
* io.c (argf_seek): wrong calling sequence of rb_io_seek().
* parse.y (stmt): while/until modifier must work for empty body. * ruby.c (ruby_set_argv): clear ARGV contents before adding args. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/io.c b/io.c
index ec699ad46d..0375b87cc4 100644
--- a/io.c
+++ b/io.c
@@ -3095,8 +3095,9 @@ argf_tell()
}
static VALUE
-argf_seek(self, offset, ptrname)
- VALUE self, offset, ptrname;
+argf_seek(argc, argv)
+ int argc;
+ VALUE *argv;
{
if (!next_argv()) {
rb_raise(rb_eArgError, "no stream to seek");
@@ -3105,7 +3106,7 @@ argf_seek(self, offset, ptrname)
if (TYPE(current_file) != T_FILE) {
return argf_forward();
}
- return rb_io_seek(current_file, offset, ptrname);
+ return rb_io_seek(argc, argv, current_file);
}
static VALUE
@@ -3474,7 +3475,7 @@ Init_IO()
rb_define_singleton_method(argf, "getc", argf_getc, 0);
rb_define_singleton_method(argf, "readchar", argf_readchar, 0);
rb_define_singleton_method(argf, "tell", argf_tell, 0);
- rb_define_singleton_method(argf, "seek", argf_seek, 2);
+ rb_define_singleton_method(argf, "seek", argf_seek, -1);
rb_define_singleton_method(argf, "rewind", argf_rewind, 0);
rb_define_singleton_method(argf, "pos", argf_tell, 0);
rb_define_singleton_method(argf, "pos=", argf_set_pos, 1);