diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-10-29 12:28:32 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-10-29 12:28:32 +0000 |
| commit | 83a52fef856b17100b7a3b438f2006d4483a19dc (patch) | |
| tree | 9dbdd9a7fccf3c6553f142c51ad80d3a601cf27f /file.c | |
| parent | 0b04050c0de50dba8e9f99f1f74237131f0d6ee9 (diff) | |
| download | ruby-83a52fef856b17100b7a3b438f2006d4483a19dc.tar.gz ruby-83a52fef856b17100b7a3b438f2006d4483a19dc.tar.xz ruby-83a52fef856b17100b7a3b438f2006d4483a19dc.zip | |
* io.c (rb_io_check_initialized): new function to check uninitialized
object. [ruby-talk:118234]
* file.c (rb_file_path), io.c (rb_io_closed): check if initialized.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@7140 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
| -rw-r--r-- | file.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -113,6 +113,7 @@ rb_file_path(obj) OpenFile *fptr; fptr = RFILE(rb_io_taint_check(obj))->fptr; + rb_io_check_initialized(fptr); if (!fptr->path) return Qnil; return rb_tainted_str_new2(fptr->path); } |
