Project

General

Profile

Actions

Bug #14633

closed

The behavior of command option `--verbose` is different from its help message

Added by makimoto (Shimpei Makimoto) over 6 years ago. Updated over 6 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.6.0dev (2018-03-26 trunk 62926) [x86_64-darwin16]
[ruby-core:86306]

Description

According to ruby --help, command option --verbose is

  -v, --verbose   print version number, then turn on verbose mode

But actually it doesn't show version number, and seems to turn verbose mode without any message.
I don't know its original intention, but currently its behavior is different its help message.

IMO, if the help message is wrong and the behavior is correct, there're three similar options (--version just shows version number; --verbose just turns verbose mode; -v do both), so it's a little confusing.

Updated by shevegen (Robert A. Heiler) over 6 years ago

You are right. It does not print the version number, so I think
something is wrong - either the behaviour, or the documented
option at --help.

Updated by nobu (Nobuyoshi Nakada) over 6 years ago

  • Backport changed from 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN to 2.3: REQUIRED, 2.4: REQUIRED, 2.5: REQUIRED

The behavior is correct, as ruby(1) says:

 -v             Enables verbose mode.  Ruby will print its version at the
                beginning and set the variable $VERBOSE to true.  Some methods
                print extra messages if this variable is true.  If this switch
                is given, and no other switches are present, Ruby quits after
                printing its version.
 --verbose      Enables verbose mode without printing version message at the
                beginning.  It sets the $VERBOSE variable to true.  If this
                switch is given, and no other switches are present, Ruby quits
                after printing its version.
Actions #3

Updated by nobu (Nobuyoshi Nakada) over 6 years ago

  • Status changed from Open to Closed

Applied in changeset trunk|r62927.


ruby.c: fix --verbose description in usage

  • ruby.c (usage): fix the description of --verbose option, which
    does not print the version number unlike -v option.
    [ruby-core:86307] [Bug #14633]

Updated by znz (Kazuhiro NISHIYAMA) over 6 years ago

nobu (Nobuyoshi Nakada) wrote:

The behavior is correct, as ruby(1) says:

 --verbose      Enables verbose mode without printing version message at the
                beginning.  It sets the $VERBOSE variable to true.  If this
                switch is given, and no other switches are present, Ruby quits
                after printing its version.

Last sentence says printing its version, but ruby --verbose outputs nothing and quits.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0