summaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-11-22 09:28:43 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-11-22 09:28:43 +0000
commit6d5f8858c1e6b2f804081bc092bedf79646fd301 (patch)
treed4a8f81773af847d5764361cc4d2714a302e0d84 /file.c
parenta71bcde822bce6db359528c9ea3d24932c85cf6a (diff)
downloadruby-6d5f8858c1e6b2f804081bc092bedf79646fd301.tar.gz
ruby-6d5f8858c1e6b2f804081bc092bedf79646fd301.tar.xz
ruby-6d5f8858c1e6b2f804081bc092bedf79646fd301.zip
* file.c (rb_file_world_writable_p): should return nil for non
world-writable files. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r--file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/file.c b/file.c
index 21f74f012..aa814a5c7 100644
--- a/file.c
+++ b/file.c
@@ -1299,7 +1299,7 @@ rb_file_world_writable_p(VALUE obj, VALUE fname)
#ifdef S_IWOTH
struct stat st;
- if (rb_stat(fname, &st) < 0) return Qfalse;
+ if (rb_stat(fname, &st) < 0) return Qnil;
if ((st.st_mode & (S_IWOTH)) == S_IWOTH) {
return UINT2NUM(st.st_mode & (S_IRUGO|S_IWUGO|S_IXUGO));
}