From 97aba937ce4cef0eac4e36109f0f3ed974029674 Mon Sep 17 00:00:00 2001 From: Kevin Newton Date: Thu, 19 Mar 2026 16:37:30 -0400 Subject: ISeq.compile_file was not switching on parser --- iseq.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/iseq.c b/iseq.c index 98d64d4dda..c26826b026 100644 --- a/iseq.c +++ b/iseq.c @@ -1710,6 +1710,8 @@ iseqw_s_compile_prism(int argc, VALUE *argv, VALUE self) return iseqw_s_compile_parser(argc, argv, self, true); } +static VALUE iseqw_s_compile_file_prism(int argc, VALUE *argv, VALUE self); + /* * call-seq: * InstructionSequence.compile_file(file[, options]) -> iseq @@ -1733,6 +1735,10 @@ iseqw_s_compile_prism(int argc, VALUE *argv, VALUE self) static VALUE iseqw_s_compile_file(int argc, VALUE *argv, VALUE self) { + if (rb_ruby_prism_p()) { + return iseqw_s_compile_file_prism(argc, argv, self); + } + VALUE file, opt = Qnil; VALUE parser, f, exc = Qnil, ret; rb_ast_t *ast; -- cgit v1.2.3