summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2024-03-09 13:59:24 +0100
committerNobuyoshi Nakada <nobu@ruby-lang.org>2024-03-15 22:21:43 +0900
commit9284fe123ef583ec4ba09097bcc795a54b1f5cf7 (patch)
treeadefc2d3d404f5602dc664c9294de1973cb329e6
parenta26e3bf360ed1044d3b3079402df2e2956921c16 (diff)
Remove unnecessary else branch
This matches the existing style in the rest of the file.
-rw-r--r--variable.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/variable.c b/variable.c
index 730905cfd1..4e2ac0dcdc 100644
--- a/variable.c
+++ b/variable.c
@@ -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