Project

General

Profile

Actions

Bug #20071

closed

Reading code from stdin SEGV's when `--parser=prism`

Added by eightbitraptor (Matt V-H) 11 months ago. Updated 11 months ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:115776]

Description

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

Actions

Also available in: Atom PDF

Like0
Like0Like0