From 93b463e2d0a8ba573c03fec177d4da374c5fbb65 Mon Sep 17 00:00:00 2001 From: ocean Date: Sat, 5 Mar 2005 09:30:24 +0000 Subject: * dir.c (rb_glob): fixed mismatch of argument. * dir.c (fnmatch): removed unnecessary code. (by string.c 1.219) * win32/win32.c (NtInitialize): ditto. (by numeric.c 1.117) git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- dir.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'dir.c') diff --git a/dir.c b/dir.c index 17f0347bf..b516ef275 100644 --- a/dir.c +++ b/dir.c @@ -303,8 +303,6 @@ fnmatch(p, s, flags) const char *ptmp = 0; const char *stmp = 0; - if (!p) p = ""; - if (!s) s = ""; if (pathname) { while (1) { if (p[0] == '*' && p[1] == '*' && p[2] == '/') { @@ -1407,7 +1405,7 @@ rb_glob(path, func, arg) args.func = func; args.arg = arg; - status = rb_glob2(rb_str_new2(path), 0, rb_glob_caller, &args); + status = rb_glob2(rb_str_new2(path), 0, 0, rb_glob_caller, &args); if (status) rb_jump_tag(status); } @@ -1574,10 +1572,6 @@ dir_s_aref(obj, str) * Dir.glob("*") #=> ["config.h", "main.rb"] * Dir.glob("*", File::FNM_DOTMATCH) #=> [".", "..", "config.h", "main.rb"] * - * Dir.glob("*", File::FNM_DOTMATCH) #=> [".", "..", "config.h", - * "main.rb"] - * Dir.glob("**.rb") #=> [] - * * rbfiles = File.join("**", "*.rb") * Dir.glob(rbfiles) #=> ["main.rb", * "lib/song.rb", -- cgit