Defect #23829

Wrong allow-override example in rdm-mailhandler.rb

Added by Rene H 8 months ago. Updated 7 months ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:Email receiving
Target version:3.2.4
Resolution:Fixed Affected version:3.3.0

Description

The help-text in the rdm-manilhandler.rb -script has wrong examples. The current version says eg:

You can use --allow_override=all to allow all attributes to be overridable.

The correct paramter should be
--allow-override all

There are also a couple of other examples that use --allow_override instead of --allow-override

Associated revisions

Revision 15843
Added by Jean-Philippe Lang 7 months ago

Wrong allow-override example in rdm-mailhandler.rb (#23829).

History

#1 Updated by Toshi MARUYAMA 8 months ago

  • Status changed from New to Confirmed
  • Target version set to 3.1.7
require 'optparse'

optparse = OptionParser.new do |opt|
  opt.on("-o", "--allow-override ATTRS",''){|v| puts v}
end

optparse.parse!

"--allow-override=all" and "--allow-override all" are accepted.

$ ruby test.rb --allow-override=all
all
$ ruby test.rb --allow-override all
all

But "--allow_override" should be fixed.

$ ruby test.rb --allow_override all
test.rb:7:in `<main>': invalid option: --allow_override (OptionParser::InvalidOption)
$ ruby test.rb --allow_override=all
test.rb:7:in `<main>': invalid option: --allow_override=all (OptionParser::InvalidOption)

#2 Updated by Jean-Philippe Lang 7 months ago

  • Status changed from Confirmed to Closed
  • Assignee set to Jean-Philippe Lang
  • Target version changed from 3.1.7 to 3.2.4
  • Resolution set to Fixed

Fix committed, thanks. 3.1 is not affected.

Also available in: Atom PDF