Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

+ ruby-parse: add ability to read fragment from stdin #844

Merged
merged 1 commit into from
Jan 27, 2022

Conversation

jstanley0
Copy link
Contributor

use - as the filename to read from stdin

this is useful when parsing multiple lines or code containing characters that would otherwise need to be escaped

@jstanley0
Copy link
Contributor Author

another option is to read a fragment from stdin where we're currently printing "need something to parse" and exiting (line 180 in runner.rb); I am happy with either approach

which is useful when parsing multiple lines or code containing
characters that would otherwise need to be escaped from the shell
@jstanley0 jstanley0 changed the title + add ability to read fragment from stdin add ability to read fragment from stdin Jan 27, 2022
@iliabylich
Copy link
Collaborator

So this change allows running echo "foo" | ruby-parse -, right?

@jstanley0
Copy link
Contributor Author

exactly - or just ruby-parse - and then paste some ruby code, followed by Ctrl+D

@iliabylich iliabylich changed the title add ability to read fragment from stdin + ruby-parse: add ability to read fragment from stdin Jan 27, 2022
@iliabylich iliabylich merged commit df46c5d into whitequark:master Jan 27, 2022
@iliabylich
Copy link
Collaborator

Thanks! Let me know if you need a release.

@jstanley0 jstanley0 deleted the accept-stdin-input branch January 27, 2022 02:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants