diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-09-19 15:43:49 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-09-19 15:43:49 +0000 |
| commit | e4961d1fa924a6441ce7d41fc81438eb5476b90d (patch) | |
| tree | 3c9a2229a544925e4b706a3850680fbdd8a30817 | |
| parent | b5aef633862dbcf988075a6344084f2a8bbedca6 (diff) | |
| download | ruby-e4961d1fa924a6441ce7d41fc81438eb5476b90d.tar.gz ruby-e4961d1fa924a6441ce7d41fc81438eb5476b90d.tar.xz ruby-e4961d1fa924a6441ce7d41fc81438eb5476b90d.zip | |
* io.c (io_close): call rb_io_close() directly if io is a T_FILE
object. [ruby-dev:27156]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@9234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -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); } |
