Actions
Bug #12323
closedWrong example code in OptionParser documentation
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin15]
Description
There is a complete example code in OptionParser documentation (http://ruby-doc.org/stdlib-2.3.0/libdoc/optparse/rdoc/OptionParser.html). Trying to run it got next error message:
example.rb:33:in 'parse': undefined local variable or method 'option_parser' for OptparseExample:Class (NameError) from example.rb:138:in '<main>'
I fixed a code of that example and attached it to this ticket. Maybe it should be moderated.
Files
Actions
Like0
Like0Like0Like0Like0