
Issue #20071 has been updated by eightbitraptor (Matthew Valentine-House). cc @HParker Would you be ok to take a look at the PR? I'm not sure of the best way to address this. ---------------------------------------- Bug #20071: Reading code from stdin SEGV's when `--parser=prism` https://bugs.ruby-lang.org/issues/20071#change-105713 * Author: eightbitraptor (Matthew Valentine-House) * Status: Open * Priority: Normal * Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN ---------------------------------------- The following examples all SEGV on master. ``` ruby --parser=prism cat test_code.rb | ruby --parser=prism ruby --parser=prism < test_code.rb ``` This is because the prism setup code in `process_options` either assumes that a file has been passed or an explicit string with `-e` and does not handle the case where the input is expected to come from `stdin`. [This PR attempts to address this](https://github.com/ruby/ruby/pull/9282) -- https://bugs.ruby-lang.org/