diff options
| author | Yuta Saito <kateinoigakukun@gmail.com> | 2024-07-19 09:14:12 +0000 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2024-07-26 17:07:50 +0000 |
| commit | 1992bd31a55c8c1805da7dfa3d594807184cee4b (patch) | |
| tree | e65016dc27570b02df59d0cbf4b2bc080e8c5f47 /test/ruby/test_lambda.rb | |
| parent | cb5c4605943728121eba48e1cac92f5f6cd7cf4b (diff) | |
[ruby/prism] Fallback to pm_string_file_init on platforms without memory-mapped files
> ..., and on other POSIX systems we'll use `read`.
As `pm_string_mapped_init`'s doc comment says, it should fall back to
`read(2)`-based implementation on platforms without memory-mapped files
like WASI, but it didn't. This commit fixes it by calling `pm_string_file_init`
in the fallback case.
Also `defined(_POSIX_MAPPED_FILES)` check for `read(2)`-based path is
unnecessary, and it prevents the fallback from being executed, so this
change removes it.
https://github.com/ruby/prism/commit/b3d9064b71
Diffstat (limited to 'test/ruby/test_lambda.rb')
0 files changed, 0 insertions, 0 deletions
