зеркало из https://github.com/github/ruby.git
* 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/trunk@28160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
72992b97d3
Коммит
45815f9c9d
|
@ -1,3 +1,8 @@
|
|||
Sat Jun 5 08:30:42 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* file.c (rb_f_test): 'W' should test writable by real uid/git,
|
||||
not world writable. [ruby-core:30587]
|
||||
|
||||
Sat Jun 5 06:20:57 2010 Eric Hodel <drbrain@segment7.net>
|
||||
|
||||
* dir.c: Clarification of what '*' matches. Patch by John Wells
|
||||
|
|
2
file.c
2
file.c
|
@ -4099,7 +4099,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]);
|
||||
|
|
|
@ -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))
|
||||
|
|
Загрузка…
Ссылка в новой задаче