mirror of
https://github.com/ruby/ruby.git
synced 2025-09-17 01:23:57 +02:00
merge revision(s) 39351:
* file.c (access_internal): removed. * file.c (rb_file_readable_real): use access() instead of access_internal(). * file.c (rb_file_writable_real): ditto. * file.c (rb_file_executable_real): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@39651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
22e2bfc646
commit
286a00f46b
3 changed files with 14 additions and 12 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
Sat Mar 9 21:15:39 2013 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||||
|
|
||||||
|
* file.c (access_internal): removed.
|
||||||
|
* file.c (rb_file_readable_real): use access() instead of
|
||||||
|
access_internal().
|
||||||
|
* file.c (rb_file_writable_real): ditto.
|
||||||
|
* file.c (rb_file_executable_real): ditto.
|
||||||
|
|
||||||
Wed Mar 6 22:13:38 2013 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
|
Wed Mar 6 22:13:38 2013 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
|
||||||
|
|
||||||
merge revision(s) 39297: [Backport #8032]
|
merge revision(s) 39297: [Backport #8032]
|
||||||
|
|
12
file.c
12
file.c
|
@ -1109,12 +1109,6 @@ eaccess(const char *path, int mode)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static inline int
|
|
||||||
access_internal(const char *path, int mode)
|
|
||||||
{
|
|
||||||
return access(path, mode);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Document-class: FileTest
|
* Document-class: FileTest
|
||||||
|
@ -1346,7 +1340,7 @@ rb_file_readable_real_p(VALUE obj, VALUE fname)
|
||||||
rb_secure(2);
|
rb_secure(2);
|
||||||
FilePathValue(fname);
|
FilePathValue(fname);
|
||||||
fname = rb_str_encode_ospath(fname);
|
fname = rb_str_encode_ospath(fname);
|
||||||
if (access_internal(StringValueCStr(fname), R_OK) < 0) return Qfalse;
|
if (access(StringValueCStr(fname), R_OK) < 0) return Qfalse;
|
||||||
return Qtrue;
|
return Qtrue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1418,7 +1412,7 @@ rb_file_writable_real_p(VALUE obj, VALUE fname)
|
||||||
rb_secure(2);
|
rb_secure(2);
|
||||||
FilePathValue(fname);
|
FilePathValue(fname);
|
||||||
fname = rb_str_encode_ospath(fname);
|
fname = rb_str_encode_ospath(fname);
|
||||||
if (access_internal(StringValueCStr(fname), W_OK) < 0) return Qfalse;
|
if (access(StringValueCStr(fname), W_OK) < 0) return Qfalse;
|
||||||
return Qtrue;
|
return Qtrue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1482,7 +1476,7 @@ rb_file_executable_real_p(VALUE obj, VALUE fname)
|
||||||
rb_secure(2);
|
rb_secure(2);
|
||||||
FilePathValue(fname);
|
FilePathValue(fname);
|
||||||
fname = rb_str_encode_ospath(fname);
|
fname = rb_str_encode_ospath(fname);
|
||||||
if (access_internal(StringValueCStr(fname), X_OK) < 0) return Qfalse;
|
if (access(StringValueCStr(fname), X_OK) < 0) return Qfalse;
|
||||||
return Qtrue;
|
return Qtrue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
#define RUBY_VERSION "2.0.0"
|
#define RUBY_VERSION "2.0.0"
|
||||||
#define RUBY_RELEASE_DATE "2013-03-06"
|
#define RUBY_RELEASE_DATE "2013-03-09"
|
||||||
#define RUBY_PATCHLEVEL 20
|
#define RUBY_PATCHLEVEL 21
|
||||||
|
|
||||||
#define RUBY_RELEASE_YEAR 2013
|
#define RUBY_RELEASE_YEAR 2013
|
||||||
#define RUBY_RELEASE_MONTH 3
|
#define RUBY_RELEASE_MONTH 3
|
||||||
#define RUBY_RELEASE_DAY 6
|
#define RUBY_RELEASE_DAY 9
|
||||||
|
|
||||||
#include "ruby/version.h"
|
#include "ruby/version.h"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue