mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b9228a014b
commit
b617f5270c
1 changed files with 3 additions and 4 deletions
7
eval.c
7
eval.c
|
@ -5027,7 +5027,6 @@ rb_feature_p(feature, wait)
|
||||||
{
|
{
|
||||||
VALUE *p, *pend;
|
VALUE *p, *pend;
|
||||||
char *f;
|
char *f;
|
||||||
int len;
|
|
||||||
|
|
||||||
p = RARRAY(rb_features)->ptr;
|
p = RARRAY(rb_features)->ptr;
|
||||||
pend = p + RARRAY(rb_features)->len;
|
pend = p + RARRAY(rb_features)->len;
|
||||||
|
@ -5036,12 +5035,12 @@ rb_feature_p(feature, wait)
|
||||||
if (strcmp(f, feature) == 0) {
|
if (strcmp(f, feature) == 0) {
|
||||||
goto load_wait;
|
goto load_wait;
|
||||||
}
|
}
|
||||||
len = strlen(f);
|
|
||||||
if (strncmp(f, feature, strlen(feature)) == 0) {
|
if (strncmp(f, feature, strlen(feature)) == 0) {
|
||||||
if (strcmp(f+len, ".so") == 0) {
|
char *ext = strrchr(f, '.');
|
||||||
|
if (strcmp(ext, ".so") == 0) {
|
||||||
return Qtrue;
|
return Qtrue;
|
||||||
}
|
}
|
||||||
if (strcmp(f+len, ".rb") == 0) {
|
if (strcmp(ext, ".rb") == 0) {
|
||||||
if (wait) goto load_wait;
|
if (wait) goto load_wait;
|
||||||
return Qtrue;
|
return Qtrue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue