From 9284fe123ef583ec4ba09097bcc795a54b1f5cf7 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Sat, 9 Mar 2024 13:59:24 +0100 Subject: [PATCH] Remove unnecessary else branch This matches the existing style in the rest of the file. --- variable.c | 22 +++++++++++----------- 1 file 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