summaryrefslogtreecommitdiffstats
path: root/dir.c
diff options
context:
space:
mode:
authorocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-06-28 13:08:32 +0000
committerocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-06-28 13:08:32 +0000
commit0b28b9f3e982eaeb833ca130de2c30c7784ebae5 (patch)
tree534c6f204faa86359703ad1cb7d591e87060533a /dir.c
parent1c8ae6d7c27191a41dd3eeb8022699a105a52192 (diff)
downloadruby-0b28b9f3e982eaeb833ca130de2c30c7784ebae5.tar.gz
ruby-0b28b9f3e982eaeb833ca130de2c30c7784ebae5.tar.xz
ruby-0b28b9f3e982eaeb833ca130de2c30c7784ebae5.zip
* dir.c, eval.c, parse.y, process.c, ruby.c: avoid warning "unused
variable" [ruby-dev:26387] * dir.c (glob_helper): avoid warning "enumeration value `RECURSIVE' not handled in switch" [ruby-dev:26392] (patch from Kazuhiro NISHIYAMA) git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8669 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/dir.c b/dir.c
index bd9ea02a5..432e0da2f 100644
--- a/dir.c
+++ b/dir.c
@@ -1220,6 +1220,8 @@ glob_helper(path, dirsep, exist, isdir, beg, end, flags, func, arg)
case MATCH_DIR:
match_dir = 1;
break;
+ case RECURSIVE:
+ rb_bug("continuous RECURSIVEs");
}
}
@@ -1234,7 +1236,6 @@ glob_helper(path, dirsep, exist, isdir, beg, end, flags, func, arg)
isdir = NO;
}
}
-
if (match_dir && isdir == UNKNOWN) {
if (do_stat(path, &st) == 0) {
exist = YES;
@@ -1245,12 +1246,10 @@ glob_helper(path, dirsep, exist, isdir, beg, end, flags, func, arg)
isdir = NO;
}
}
-
if (match_all && exist == YES) {
status = glob_call_func(func, path, arg);
if (status) return status;
}
-
if (match_dir && isdir == YES) {
char *tmp = join_path(path, dirsep, "");
status = glob_call_func(func, tmp, arg);
@@ -1612,7 +1611,6 @@ static VALUE
dir_open_dir(path)
VALUE path;
{
- struct dir_data *dp;
VALUE dir = rb_funcall(rb_cDir, rb_intern("open"), 1, path);
if (TYPE(dir) != T_DATA ||