Skip to content

Commit 547a7b8

Browse files
eregonEarlopain
authored andcommitted
[ruby/prism] Clarify the documentation of -x, it always searches a
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>
1 parent 11de89c commit 547a7b8

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

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

prism/prism.c

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

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

0 commit comments

Comments
 (0)