Actions
Bug #21018
closedShow invalid command line option more properly
Description
Currently the invalid command line option character is printed as-is.
This makes the error message confusing sometimes.
$ ruby -$'\rx'
(-h will show valid options) (RuntimeError)
$ ruby -$'\U1f608'
ruby: invalid option -? (-h will show valid options) (RuntimeError)
These are actually:
$ ruby -$'\rx' |& cat -e
ruby: invalid option -^M (-h will show valid options) (RuntimeError)$
$ ruby -$'\U1f608' |& cat -e
ruby: invalid option -M-p (-h will show valid options) (RuntimeError)$
I think control characters and multibyte characters should be printed properly.
Actions
Like1
Like0