On Sun 11 Jan 2004 at 21:40:22 +0900, Yukihiro Matsumoto wrote:

> In message "Re: [PATCH] File.readable_world? and File.writable_world?"
>     on 04/01/11, Ian Macdonald <ian / caliban.org> writes:
> 
> |> I prefer world_writable? that means being writable from anybody.
> |
> |What about writable_others? I think that would be useful to have, too.
> 
> I think it would be source of confusion.  They are too similar.  How
> about writable_world? returns its permission bits if the file is
> writable from others, otherwise nil?
> 
>   mode   result
> ================
>   777 => 777
>   557 => 557
>   755 => nil

That's an interesting idea. The only problem is that world_writable?
would return nil when checking a file that has accidentally acquired,
for example, mode 446, which is very insecure. Returning nil in such a
case from a method with a name like world_writable? might also be
confusing.

Nevertheless, I can implement it this way and send you a new patch
today, if you want.

What about Nobu's suggestion to have the methods in File::Stat, too? Do
you want me to add them there, also?

Ian
-- 
Ian Macdonald               | The one sure way to make a lazy man look
System Administrator        | respectable is to put a fishing rod in his 
ian / caliban.org             | hand. 
http://www.caliban.org      | 
                            |