From fd4417f8fe0c82c7c2f9adaa556f06551d1ed111 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 4 Jun 2010 23:30:48 +0000 Subject: [PATCH] * file.c (rb_f_test): 'W' should test writable by real uid/git, not world writable. [ruby-core:30587] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@28160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ file.c | 2 +- test/ruby/test_file_exhaustive.rb | 2 +- version.h | 4 ++-- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 63b0457618..fcdec5ed0c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sat Jun 5 08:30:42 2010 Nobuyoshi Nakada + + * file.c (rb_f_test): 'W' should test writable by real uid/git, + not world writable. [ruby-core:30587] + Fri Jun 4 10:46:33 2010 Nobuyoshi Nakada * ext/dl/cfunc.c (rb_dlcfunc_inspect): should taint the result. diff --git a/file.c b/file.c index c86eb53f0c..0ce6e3a19b 100644 --- a/file.c +++ b/file.c @@ -4107,7 +4107,7 @@ rb_f_test(int argc, VALUE *argv) return rb_file_writable_p(0, argv[1]); case 'W': - return rb_file_world_writable_p(0, argv[1]); + return rb_file_writable_real_p(0, argv[1]); case 'x': return rb_file_executable_p(0, argv[1]); diff --git a/test/ruby/test_file_exhaustive.rb b/test/ruby/test_file_exhaustive.rb index 9589e909da..35d6bcff14 100644 --- a/test/ruby/test_file_exhaustive.rb +++ b/test/ruby/test_file_exhaustive.rb @@ -538,7 +538,7 @@ class TestFileExhaustive < Test::Unit::TestCase assert_equal(File.socket?(f), test(?S, f)) assert_equal(File.setuid?(f), test(?u, f)) assert_equal(File.writable?(f), test(?w, f)) - assert_equal(File.world_writable?(f), test(?W, f)) + assert_equal(File.writable_real?(f), test(?W, f)) assert_equal(File.executable?(f), test(?x, f)) assert_equal(File.executable_real?(f), test(?X, f)) assert_equal(File.zero?(f), test(?z, f)) diff --git a/version.h b/version.h index ed7d4dadce..7fe672a094 100644 --- a/version.h +++ b/version.h @@ -1,5 +1,5 @@ #define RUBY_VERSION "1.9.2" -#define RUBY_RELEASE_DATE "2010-06-04" +#define RUBY_RELEASE_DATE "2010-06-05" #define RUBY_PATCHLEVEL -1 #define RUBY_VERSION_MAJOR 1 @@ -7,7 +7,7 @@ #define RUBY_VERSION_TEENY 1 #define RUBY_RELEASE_YEAR 2010 #define RUBY_RELEASE_MONTH 6 -#define RUBY_RELEASE_DAY 4 +#define RUBY_RELEASE_DAY 5 #include "ruby/version.h"