Project

General

Profile

Actions

Bug #12899

closed

OptParse documentation : example is broken

Added by glork-riouf (Glork Riouf) over 7 years ago. Updated over 7 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]
[ruby-core:77912]

Description

Hello,

The complete example code in OptParse documentation at http://ruby-doc.org/stdlib-2.3.1/libdoc/optparse/rdoc/OptParse.html#class-OptParse-label-Complete+example does not run at all.

There are several problems in this code. call of instance method from class method is one of them.

 example.rb:32:in `parse': undefined local variable or method `option_parser' for OptparseExample:Class (NameError)

I tried to fix but I am not experienced enough to find a solution


Related issues 1 (0 open1 closed)

Is duplicate of Ruby master - Bug #12323: Wrong example code in OptionParser documentationClosedActions
Actions #1

Updated by nobu (Nobuyoshi Nakada) over 7 years ago

  • Is duplicate of Bug #12323: Wrong example code in OptionParser documentation added

Updated by nobu (Nobuyoshi Nakada) over 7 years ago

  • Status changed from Open to Closed
Actions

Also available in: Atom PDF

Like0
Like0Like0