```diff diff --git b/core/src/main/java/org/jruby/ir/runtime/IRRuntimeHelpers.java a/core/src/main/java/org/jruby/ir/runtime/IRRuntimeHelpers.java index 480083d3b5..8b639c979b 100644 --- b/core/src/main/java/org/jruby/ir/runtime/IRRuntimeHelpers.java +++ a/core/src/main/java/org/jruby/ir/runtime/IRRuntimeHelpers.java @@ -2186,7 +2186,7 @@ public class IRRuntimeHelpers { @JIT @Interp public static RubyString getFileNameStringFromScope(ThreadContext context, StaticScope currScope) { // FIXME: Not very efficient to do all this every time - return context.runtime.newString(currScope.getIRScope().getFile()); + return context.runtime.newString(currScope.getFile()); } @JIT ```