Skip to content

Commit 0cdf579

Browse files
eregonEarlopain
andauthored
Clarify the documentation of -x, it always searches a shebang that includes "ruby" (#4110)
* Clarify the documentation of -x, it always searches a shebang that includes "ruby" * Update one more occurence --------- Co-authored-by: Earlopain <14981592+Earlopain@users.noreply.github.com>
1 parent 5172b2a commit 0cdf579

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

include/prism/options.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ static const uint8_t PM_OPTIONS_COMMAND_LINE_P = 0x10;
103103

104104
/**
105105
* A bit representing whether or not the command line -x option was set. -x
106-
* searches the input file for a shebang that matches the current Ruby engine.
106+
* searches the input file for a shebang that includes "ruby".
107107
*/
108108
static const uint8_t PM_OPTIONS_COMMAND_LINE_X = 0x20;
109109

src/prism.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22280,8 +22280,8 @@ parse_program(pm_parser_t *parser) {
2228022280

2228122281
/**
2228222282
* A vendored version of strnstr that is used to find a substring within a
22283-
* string with a given length. This function is used to search for the Ruby
22284-
* engine name within a shebang when the -x option is passed to Ruby.
22283+
* string with a given length. This function is used to search for "ruby"
22284+
* within a shebang when the -x option is passed to Ruby.
2228522285
*
2228622286
* The only modification that we made here is that we don't do NULL byte checks
2228722287
* because we know the little parameter will not have a NULL byte and we allow

0 commit comments

Comments
 (0)