summaryrefslogtreecommitdiff
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
commit08133b13443ea261101a54215931b29fe8de7d1d (patch)
tree534c6f204faa86359703ad1cb7d591e87060533a /dir.c
parent4029f29dd75ec52ef0e776b67371dad5c88af6e3 (diff)
* 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: svn+ssh://ci.ruby-lang.org/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 bd9ea02a50..432e0da2f0 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 ||