Merge pull request #5946 from dearblue/const-search

Don't switch constant search path from modules to Object
This commit is contained in:
Yukihiro "Matz" Matsumoto
2023-03-11 16:19:53 +09:00
committed by GitHub
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -785,7 +785,7 @@ L_RETRY:
c = c->super;
if (!skip && c == mrb->object_class) break;
}
if (!retry && base->tt == MRB_TT_MODULE) {
if (!retry && base->tt == MRB_TT_MODULE && skip) {
c = mrb->object_class;
retry = TRUE;
goto L_RETRY;
+1
View File
@@ -211,6 +211,7 @@ assert('Nested const reference') do
end
assert_equal "hello world", Syntax4Const::CONST1
assert_equal "hello world", Syntax4Const::Const2.new.const1
assert_raise(NameError) { Syntax4Const::Object }
end
assert('Abbreviated variable assignment as returns') do