mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* eval.c (rb_mod_define_method): should have clear method cache.
* eval.c (rb_mod_define_method): should have raised exception for type error. * ruby.h: changed "extern INLINE" to "static inline". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
97101e1a65
commit
b0cc7e80a6
10 changed files with 140 additions and 42 deletions
14
dir.c
14
dir.c
|
@ -609,7 +609,7 @@ rb_glob_helper(path, flag, func, arg)
|
|||
rb_glob_helper(buf, flag, func, arg);
|
||||
free(buf);
|
||||
}
|
||||
if (lstat(dir, &st) < 0) {
|
||||
if (stat(dir, &st) < 0) {
|
||||
free(base);
|
||||
break;
|
||||
}
|
||||
|
@ -637,7 +637,15 @@ rb_glob_helper(path, flag, func, arg)
|
|||
continue;
|
||||
buf = ALLOC_N(char, strlen(base)+NAMLEN(dp)+strlen(m)+6);
|
||||
sprintf(buf, "%s%s%s/**%s", base, (BASE)?"/":"", dp->d_name, m);
|
||||
rb_glob_helper(buf, flag, func, arg);
|
||||
sprintf(buf, "%s%s%s", base, (BASE)?"/":"", dp->d_name);
|
||||
if (lstat(buf, &st) < 0) {
|
||||
continue;
|
||||
}
|
||||
if (S_ISDIR(st.st_mode)) {
|
||||
strcat(buf, "/**");
|
||||
strcat(buf, m);
|
||||
rb_glob_helper(buf, flag, func, arg);
|
||||
}
|
||||
free(buf);
|
||||
continue;
|
||||
}
|
||||
|
@ -659,7 +667,7 @@ rb_glob_helper(path, flag, func, arg)
|
|||
free(base);
|
||||
free(magic);
|
||||
while (link) {
|
||||
lstat(link->path, &st); /* should success */
|
||||
stat(link->path, &st); /* should success */
|
||||
if (S_ISDIR(st.st_mode)) {
|
||||
int len = strlen(link->path);
|
||||
int mlen = strlen(m);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue