ruby-changes:68288
From: S-H-GAMELINKS <ko1@a...>
Date: Thu, 7 Oct 2021 15:19:01 +0900 (JST)
Subject: [ruby-changes:68288] 323e7a6744 (master): Merge if statement
https://git.ruby-lang.org/ruby.git/commit/?id=323e7a6744 From 323e7a6744a18a729d8011e237e64291cb6c02bd Mon Sep 17 00:00:00 2001 From: S-H-GAMELINKS <gamelinks007@g...> Date: Wed, 6 Oct 2021 20:18:35 +0900 Subject: Merge if statement --- variable.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/variable.c b/variable.c index c6e1012bdd..8bdc733a4c 100644 --- a/variable.c +++ b/variable.c @@ -2973,10 +2973,7 @@ set_namespace_path_i(ID id, VALUE v, void *payload) https://github.com/ruby/ruby/blob/trunk/variable.c#L2973 VALUE value = ce->value; int has_permanent_classpath; VALUE parental_path = *((VALUE *) payload); - if (!rb_is_const_id(id)) { - return ID_TABLE_CONTINUE; - } - if (!rb_namespace_p(value)) { + if (!rb_is_const_id(id) || !rb_namespace_p(value)) { return ID_TABLE_CONTINUE; } classname(value, &has_permanent_classpath); -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/