diff options
| author | Kevin Newton <kddnewton@gmail.com> | 2026-03-19 16:37:30 -0400 |
|---|---|---|
| committer | nagachika <nagachika@ruby-lang.org> | 2026-05-05 16:53:12 +0900 |
| commit | 97aba937ce4cef0eac4e36109f0f3ed974029674 (patch) | |
| tree | 4f1eb388a12e30c8686a35a687cbdd4ada94a886 | |
| parent | 469d90739a3f623648feeac3c93b961ac8fe20a2 (diff) | |
ISeq.compile_file was not switching on parser
| -rw-r--r-- | iseq.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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; |
