File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
src/main/java/org/truffleruby/language/constants Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -126,11 +126,13 @@ protected Object autoloadConstant(
126
126
// Mark the autoload constant as loading already here and not in RequireNode so that recursive lookups act as "being loaded"
127
127
autoloadConstantStart (getContext (), constant , this );
128
128
try {
129
- try {
130
- callRequireNode .call (coreLibrary ().mainObject , "require" , feature );
131
- } finally {
132
- if (autoloadConstant .shouldPublish ()) {
133
- autoloadConstant .publish (getContext (), constant );
129
+ if (!constant .getAutoloadConstant ().isPublished ()) {
130
+ try {
131
+ callRequireNode .call (coreLibrary ().mainObject , "require" , feature );
132
+ } finally {
133
+ if (autoloadConstant .shouldPublish ()) {
134
+ autoloadConstant .publish (getContext (), constant );
135
+ }
134
136
}
135
137
}
136
138
You can’t perform that action at this time.
0 commit comments