From 99be646a7f22dbc7be24b871cb950bf65414f9d5 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 29 Oct 2004 12:28:32 +0000 Subject: * 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: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7140 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- file.c | 1 + 1 file changed, 1 insertion(+) (limited to 'file.c') diff --git a/file.c b/file.c index c9aa494143..066745ca6a 100644 --- a/file.c +++ b/file.c @@ -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); } -- cgit v1.2.3