diff options
Diffstat (limited to 'dir.c')
-rw-r--r-- | dir.c | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -389,7 +389,7 @@ dir_seek(dir, pos) #ifdef HAVE_SEEKDIR GetDIR(dir, dirp); seekdir(dirp->dir, NUM2INT(pos)); - return dir; + return pos; #else rb_notimplement(); #endif @@ -930,10 +930,13 @@ dir_s_glob(dir, str) } if (buf != buffer) free(buf); - if (ary && RARRAY(ary)->len == 0) { - rb_warning("no matches found: %s", RSTRING(str)->ptr); + if (ary) { + if (RARRAY(ary)->len == 0) { + rb_warning("no matches found: %s", RSTRING(str)->ptr); + } + return ary; } - return ary; + return Qnil; } static VALUE |