From: Glork.Riouf@... Date: 2016-11-04T09:45:45+00:00 Subject: [ruby-core:77912] [Ruby trunk Bug#12899] OptParse documentation : example is broken Issue #12899 has been reported by Glork Riouf. ---------------------------------------- Bug #12899: OptParse documentation : example is broken https://bugs.ruby-lang.org/issues/12899 * Author: Glork Riouf * Status: Open * Priority: Normal * Assignee: * ruby -v: ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux] * Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN ---------------------------------------- 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 -- https://bugs.ruby-lang.org/ Unsubscribe: