Skip to content

Clarify the documentation of -x, it always searches a shebang that includes "ruby"#4110

Merged
Earlopain merged 2 commits into
ruby:mainfrom
eregon:fix-x-option-doc
May 15, 2026
Merged

Clarify the documentation of -x, it always searches a shebang that includes "ruby"#4110
Earlopain merged 2 commits into
ruby:mainfrom
eregon:fix-x-option-doc

Conversation

@eregon
Copy link
Copy Markdown
Member

@eregon eregon commented May 14, 2026

See

prism/src/prism.c

Lines 22503 to 22506 in 5172b2a

// If the -x command line flag is set, or the first shebang of the file does
// not include "ruby", then we'll search for a shebang that does include
// "ruby" and start parsing from there.
bool search_shebang = PM_PARSER_COMMAND_LINE_OPTION_X(parser);

@Earlopain Earlopain merged commit 0cdf579 into ruby:main May 15, 2026
67 of 69 checks passed
matzbot pushed a commit to ruby/ruby that referenced this pull request May 15, 2026
shebang that includes "ruby"
(ruby/prism#4110)

* Clarify the documentation of -x, it always searches a shebang that includes "ruby"

* Update one more occurence

---------

ruby/prism@0cdf579295

Co-authored-by: Earlopain <14981592+Earlopain@users.noreply.github.com>
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.

2 participants