mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
[PRISM] Raise LoadError when file cannot be read
This commit is contained in:
parent
6f4f360fc4
commit
af24ba4034
4 changed files with 19 additions and 9 deletions
2
ruby.c
2
ruby.c
|
@ -2157,7 +2157,7 @@ prism_script(ruby_cmdline_options_t *opt, pm_parse_result_t *result)
|
|||
}
|
||||
else {
|
||||
pm_options_command_line_set(options, command_line);
|
||||
error = pm_load_file(result, opt->script_name);
|
||||
error = pm_load_file(result, opt->script_name, true);
|
||||
|
||||
// If reading the file did not error, at that point we load the command
|
||||
// line options. We do it in this order so that if the main script fails
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue