diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-11-22 09:28:43 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-11-22 09:28:43 +0000 |
| commit | c5ce3ea019e35780473ca1156e4bdcc3a1f91322 (patch) | |
| tree | d4a8f81773af847d5764361cc4d2714a302e0d84 | |
| parent | 89f1118329a8d0aad173baa091173428d3b3ce30 (diff) | |
* file.c (rb_file_world_writable_p): should return nil for non
world-writable files.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | file.c | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Sat Nov 22 18:24:24 2008 Yukihiro Matsumoto <matz@ruby-lang.org> + + * file.c (rb_file_world_writable_p): should return nil for non + world-writable files. + Sat Nov 22 10:31:25 2008 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp> * ext/tk/lib/tkextlib/blt.rb, ext/tk/lib/tkextlib/blt/vector.rb: @@ -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)); } |
