Skip to content

Commit

Permalink
Remove unnecessary else branch
Browse files Browse the repository at this point in the history
This matches the existing style in the rest of the file.
  • Loading branch information
fxn authored and nobu committed Mar 15, 2024
1 parent a26e3bf commit 9284fe1
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions variable.c
Expand Up @@ -271,19 +271,19 @@ rb_tmp_class_path(VALUE klass, bool *permanent, fallback_func fallback)
if (!NIL_P(path)) {
return path;
}
else {
if (RB_TYPE_P(klass, T_MODULE)) {
if (rb_obj_class(klass) == rb_cModule) {
path = Qfalse;
}
else {
bool perm;
path = rb_tmp_class_path(RBASIC(klass)->klass, &perm, fallback);
}

if (RB_TYPE_P(klass, T_MODULE)) {
if (rb_obj_class(klass) == rb_cModule) {
path = Qfalse;
}
else {
bool perm;
path = rb_tmp_class_path(RBASIC(klass)->klass, &perm, fallback);
}
*permanent = false;
return fallback(klass, path);
}

*permanent = false;
return fallback(klass, path);
}

VALUE
Expand Down

0 comments on commit 9284fe1

Please sign in to comment.