diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | io.c | 4 |
2 files changed, 9 insertions, 0 deletions
@@ -1,3 +1,8 @@ +Tue Sep 20 00:34:07 2005 Yukihiro Matsumoto <matz@ruby-lang.org> + + * io.c (io_close): call rb_io_close() directly if io is a T_FILE + object. [ruby-dev:27156] + Mon Sep 19 19:09:08 2005 Minero Aoki <aamine@loveruby.net> * file.c (rb_file_chown): should accept nil. [ruby-dev:27171] @@ -2134,6 +2134,10 @@ static VALUE io_close(io) VALUE io; { + if (TYPE(io) == T_FILE) { + rb_io_close(io); + return Qnil; + } return rb_funcall(io, rb_intern("close"), 0, 0); } |