From: "eightbitraptor (Matthew Valentine-House) via ruby-core" Date: 2023-12-18T17:06:19+00:00 Subject: [ruby-core:115777] [Ruby master Bug#20071] Reading code from stdin SEGV's when `--parser=prism` 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/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/