From 671106ce68efaa9598bc113a5b4bf9b8d44f562a Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Thu, 14 May 2026 23:08:17 +0200 Subject: [PATCH 1/2] Clarify the documentation of -x, it always searches a shebang that includes "ruby" --- include/prism/options.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/prism/options.h b/include/prism/options.h index 1b6ff4af1f..0f5d7529b1 100644 --- a/include/prism/options.h +++ b/include/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; From 406cf47c3d6734272d0fd67f6c5be3b4815e5a9b Mon Sep 17 00:00:00 2001 From: Earlopain <14981592+Earlopain@users.noreply.github.com> Date: Fri, 15 May 2026 19:55:13 +0200 Subject: [PATCH 2/2] Update one more occurence --- src/prism.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/prism.c b/src/prism.c index ffc617e93f..3172799283 100644 --- a/src/prism.c +++ b/src/prism.c @@ -22280,8 +22280,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