diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-02-29 08:05:32 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-02-29 08:05:32 +0000 |
| commit | 5928d4c1e01a076c3c992b3a003c167a5d4b7600 (patch) | |
| tree | 3e43148d3114380fff1418aa3ff6d01b157a97e4 /io.c | |
| parent | ac9d16f8b62f24b7bb7190888b6bc28cf2e75af9 (diff) | |
| download | ruby-5928d4c1e01a076c3c992b3a003c167a5d4b7600.tar.gz ruby-5928d4c1e01a076c3c992b3a003c167a5d4b7600.tar.xz ruby-5928d4c1e01a076c3c992b3a003c167a5d4b7600.zip | |
2000-02-29
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
| -rw-r--r-- | io.c | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -1707,7 +1707,7 @@ rb_io_mode_string(fptr) } static VALUE -rb_io_reopen(io, nfile) +io_reopen(io, nfile) VALUE io, nfile; { OpenFile *fptr, *orig; @@ -1775,7 +1775,7 @@ rb_io_reopen(io, nfile) } static VALUE -rb_file_reopen(argc, argv, file) +rb_io_reopen(argc, argv, file) int argc; VALUE *argv; VALUE file; @@ -1787,7 +1787,7 @@ rb_file_reopen(argc, argv, file) rb_secure(4); if (rb_scan_args(argc, argv, "11", &fname, &nmode) == 1) { if (TYPE(fname) == T_FILE) { /* fname must be IO */ - return rb_io_reopen(file, fname); + return io_reopen(file, fname); } } @@ -3248,7 +3248,7 @@ Init_IO() rb_define_virtual_variable("$_", rb_lastline_get, rb_lastline_set); rb_define_method(rb_cIO, "clone", rb_io_clone, 0); - rb_define_method(rb_cIO, "reopen", rb_io_reopen, 1); + rb_define_method(rb_cIO, "reopen", rb_io_reopen, -1); rb_define_method(rb_cIO, "print", rb_io_print, -1); rb_define_method(rb_cIO, "putc", rb_io_putc, 1); @@ -3372,8 +3372,6 @@ Init_IO() Init_File(); - rb_define_method(rb_cFile, "reopen", rb_file_reopen, -1); - rb_define_singleton_method(rb_cFile, "new", rb_file_s_open, -1); rb_define_singleton_method(rb_cFile, "open", rb_file_s_open, -1); |
