load.c: move loop invariant condition
* load.c (rb_feature_p): move this_feature_index condition which is loop invariant. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8237581a2e
commit
1b7143309b
4
load.c
4
load.c
@ -406,7 +406,8 @@ rb_feature_p(const char *feature, const char *ext, int rb, int expanded, const c
|
||||
or ends in '/'. This includes both match forms above, as well
|
||||
as any distractors, so we may ignore all other entries in `features`.
|
||||
*/
|
||||
for (i = 0; !NIL_P(this_feature_index); i++) {
|
||||
if (!NIL_P(this_feature_index)) {
|
||||
for (i = 0; ; i++) {
|
||||
VALUE entry;
|
||||
long index;
|
||||
if (RB_TYPE_P(this_feature_index, T_ARRAY)) {
|
||||
@ -442,6 +443,7 @@ rb_feature_p(const char *feature, const char *ext, int rb, int expanded, const c
|
||||
return 'r';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
loading_tbl = get_loading_table();
|
||||
if (loading_tbl) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user