From 591a157b0f95dff3ce6be0956a77c7605d122243 Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Thu, 29 Aug 2024 17:06:19 +0000 Subject: [PATCH] prism_compile.c: Fix read_entire_file() for platforms without file mmap Apply similar fix to https://github.com/ruby/prism/pull/2944 --- prism_compile.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/prism_compile.c b/prism_compile.c index e2f123c810..dd2e30865a 100644 --- a/prism_compile.c +++ b/prism_compile.c @@ -10616,6 +10616,8 @@ read_entire_file(pm_string_t *string, const char *filepath) close(fd); *string = (pm_string_t) { .type = PM_STRING_MAPPED, .source = source, .length = size }; return true; +#else + return pm_string_file_init(string, filepath); #endif }