1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 1999-12-14 06:50:43 +00:00
parent c18d3740a9
commit 9d228b13de
34 changed files with 649 additions and 508 deletions

4
dir.c
View file

@ -435,7 +435,6 @@ dir_s_mkdir(argc, argv, obj)
VALUE path, vmode;
int mode;
rb_secure(2);
if (rb_scan_args(argc, argv, "11", &path, &vmode) == 2) {
mode = NUM2INT(vmode);
}
@ -444,6 +443,7 @@ dir_s_mkdir(argc, argv, obj)
}
Check_SafeStr(path);
rb_secure(2);
#if !defined(NT) && !defined(USE_CWGUSI)
if (mkdir(RSTRING(path)->ptr, mode) == -1)
rb_sys_fail(RSTRING(path)->ptr);
@ -459,8 +459,8 @@ static VALUE
dir_s_rmdir(obj, dir)
VALUE obj, dir;
{
rb_secure(2);
Check_SafeStr(dir);
rb_secure(2);
if (rmdir(RSTRING(dir)->ptr) < 0)
rb_sys_fail(RSTRING(dir)->ptr);