diff options
author | Kevin Newton <[email protected]> | 2024-03-11 11:05:31 -0400 |
---|---|---|
committer | Kevin Newton <[email protected]> | 2024-03-11 12:51:32 -0400 |
commit | a6dac9bb4f05530aec8c3f117d2cbe38bade99f2 (patch) | |
tree | 98a06c7c328148c25bd81eb801cc3c967997e13c /ruby.c | |
parent | 6242a82c8f4cc6b68ba16d86aa22fd770e8ad195 (diff) |
[PRISM] Parse stdin on CLI with prism
Diffstat (limited to 'ruby.c')
-rw-r--r-- | ruby.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -2122,7 +2122,11 @@ prism_script(ruby_cmdline_options_t *opt, pm_parse_result_t *result) VALUE error; if (strcmp(opt->script, "-") == 0) { - rb_raise(rb_eRuntimeError, "Prism support for streaming code from stdin is not currently supported"); + pm_options_command_line_set(options, command_line); + pm_options_filepath_set(options, "-"); + + prism_opt_init(opt); + error = pm_parse_stdin(result); } else if (opt->e_script) { command_line |= PM_OPTIONS_COMMAND_LINE_E; |