Skip to content

Commit 9a74df8

Browse files
committed
Fix incorrect usage of RubyString#toString()
* Due to concurrent toString() and getString() calls, this could cause an AssertionError. (cherry picked from commit 829eaf4)
1 parent 4764594 commit 9a74df8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/truffleruby/core/module/ModuleFields.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ public void setAutoloadConstant(RubyContext context, Node currentNode, String na
355355
filename));
356356
}
357357
final ReentrantLockFreeingMap<String> fileLocks = getContext().getFeatureLoader().getFileLocks();
358-
final ReentrantLock lock = fileLocks.get(filename.toString());
358+
final ReentrantLock lock = fileLocks.get(filename.getJavaString());
359359
if (lock.isLocked()) {
360360
// We need to handle the new autoload constant immediately
361361
// if Object.autoload(name, filename) is executed from filename.rb

0 commit comments

Comments
 (0)