Skip to content

Fix showing help message on wrong options#1171

Merged
ko1 merged 1 commit intoruby:masterfrom
vipera:fix-wrong-options-help
Apr 5, 2026
Merged

Fix showing help message on wrong options#1171
ko1 merged 1 commit intoruby:masterfrom
vipera:fix-wrong-options-help

Conversation

@vipera
Copy link
Copy Markdown
Contributor

@vipera vipera commented Jan 27, 2026

Description

If a CommandLineOptionError happens, the process terminates with:

exe/rdbg:49:in `rescue in <top (required)>': undefined local variable or method `opt' for main (NameError)

This patch fixes the issue by having Config::parse_argv return both the config and the options object so that the help can be displayed.

@vipera vipera force-pushed the fix-wrong-options-help branch from 3bdf2c1 to 5f1231c Compare January 27, 2026 17:07
@vipera vipera force-pushed the fix-wrong-options-help branch from 5f1231c to 569d59c Compare January 27, 2026 17:08
@ko1
Copy link
Copy Markdown
Collaborator

ko1 commented Apr 5, 2026

Thank you!

@ko1 ko1 merged commit 95997c2 into ruby:master Apr 5, 2026
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