summaryrefslogtreecommitdiff
path: root/ruby.c
diff options
context:
space:
mode:
authorKevin Newton <[email protected]>2024-09-13 11:21:28 -0400
committerKevin Newton <[email protected]>2024-09-13 12:51:53 -0400
commit9afc6a981deae6e23d938cf5c2c4baadfeaafdb1 ()
tree5142d19e6b502057f96ccf2937e91a6808fd7f90 /ruby.c
parentd42d19059d75bf1c05c1bc916775b47629b59eb7 (diff)
[PRISM] Only parse shebang on main script
Fixes [Bug #20730]
Notes: Merged: https://.com/ruby/ruby/pull/11617
-rw-r--r--ruby.c2
1 files changed, 2 insertions, 0 deletions
@@ -2155,6 +2155,8 @@ prism_script(ruby_cmdline_options_t *opt, pm_parse_result_t *result)
pm_options_t *options = &result->options;
pm_options_line_set(options, 1);
const bool read_stdin = (strcmp(opt->script, "-") == 0);
if (read_stdin) {