summaryrefslogtreecommitdiff
path: root/ruby.c
diff options
context:
space:
mode:
authorKevin Newton <[email protected]>2024-03-11 11:05:31 -0400
committerKevin Newton <[email protected]>2024-03-11 12:51:32 -0400
commita6dac9bb4f05530aec8c3f117d2cbe38bade99f2 (patch)
tree98a06c7c328148c25bd81eb801cc3c967997e13c /ruby.c
parent6242a82c8f4cc6b68ba16d86aa22fd770e8ad195 (diff)
[PRISM] Parse stdin on CLI with prism
Diffstat (limited to 'ruby.c')
-rw-r--r--ruby.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ruby.c b/ruby.c
index d2642c96c5..bcc4c350f2 100644
--- a/ruby.c
+++ b/ruby.c
@@ -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;