Hi,

At Tue, 7 Dec 2004 10:16:39 +0900,
Jos Backus wrote in [ruby-core:03910]:
> > "mode" feels confusing as "stat.mode", how about "accmode" instead?
> 
> I rather like the symmetry between File.mode and File::Stat.mode, but accmode
> is okay with me too.

File::Stat.mode differs from what you are proposing.  It is the
permission of a existing file, while yours is the mode which
requested to open.

> Btw, the patch needlessly initializes str to Qnil. It should just be
> 
>     VALUE str;

You can just write as:

+    GetOpenFile(io, fptr);
+    return rb_str_new2(rb_io_flags_mode(fptr->mode));

-- 
Nobu Nakada