Project

General

Profile

Actions

Defect #23829

closed

Wrong allow-override example in rdm-mailhandler.rb

Added by Rene H about 8 years ago. Updated about 8 years ago.

Status:
Closed
Priority:
Normal
Category:
Email receiving
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

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

Actions #1

Updated by Toshi MARUYAMA about 8 years 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)
Actions #2

Updated by Jean-Philippe Lang about 8 years 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.

Actions

Also available in: Atom PDF