prism_compile.c: Fix read_entire_file() for platforms without file mmap
Apply similar fix to https://github.com/ruby/prism/pull/2944
This commit is contained in:
parent
e07f794967
commit
591a157b0f
Notes:
git
2024-08-29 18:09:54 +00:00
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user