summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenoit Daloze <[email protected]>2026-05-15 20:28:03 +0200
committergit <[email protected]>2026-05-15 18:28:32 +0000
commit547a7b8d1ab94fac12f2fa2e83052c68111ebba1 (patch)
treebb306971a4c6dfc5a6415802f32f172ce299877a
parent11de89ca1a94899535875ea594962c79713615b1 (diff)
[ruby/prism] Clarify the documentation of -x, it always searches aHEADmaster
shebang that includes "ruby" (https://github.com/ruby/prism/pull/4110) * Clarify the documentation of -x, it always searches a shebang that includes "ruby" * Update one more occurence --------- https://github.com/ruby/prism/commit/0cdf579295 Co-authored-by: Earlopain <[email protected]>
-rw-r--r--prism/options.h2
-rw-r--r--prism/prism.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/prism/options.h b/prism/options.h
index 1b6ff4af1f..0f5d7529b1 100644
--- a/prism/options.h
+++ b/prism/options.h
@@ -103,7 +103,7 @@ static const uint8_t PM_OPTIONS_COMMAND_LINE_P = 0x10;
/**
* A bit representing whether or not the command line -x option was set. -x
- * searches the input file for a shebang that matches the current Ruby engine.
+ * searches the input file for a shebang that includes "ruby".
*/
static const uint8_t PM_OPTIONS_COMMAND_LINE_X = 0x20;
diff --git a/prism/prism.c b/prism/prism.c
index df8d0d7f83..a8bbcea097 100644
--- a/prism/prism.c
+++ b/prism/prism.c
@@ -22277,8 +22277,8 @@ parse_program(pm_parser_t *parser) {
/**
* A vendored version of strnstr that is used to find a substring within a
- * string with a given length. This function is used to search for the Ruby
- * engine name within a shebang when the -x option is passed to Ruby.
+ * string with a given length. This function is used to search for "ruby"
+ * within a shebang when the -x option is passed to Ruby.
*
* The only modification that we made here is that we don't do NULL byte checks
* because we know the little parameter will not have a NULL byte and we allow