Project

General

Profile

Actions

Bug #21018

closed

Show invalid command line option more properly

Added by nobu (Nobuyoshi Nakada) 2 days ago. Updated about 21 hours ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:120556]

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 #1

Updated by nobu (Nobuyoshi Nakada) about 21 hours ago

  • Status changed from Open to Closed

Applied in changeset git|dfe6b7c02efa3bc2f5426eb64107ac0ac45a66a4.


[Bug #21018] Show invalid command line option more properly

Actions

Also available in: Atom PDF

Like1
Like0