From: Fritz Trapper Date: 2010-12-06T18:52:46+09:00 Subject: Re: Commandline: How to add an own option? Thomas Sawyer wrote in post #966397: > You need to give more context then this. What code is this? As far as > I can tell it's just a error from word 'version'. OK, the context is: ------------- #!/usr/bin/env ruby require 'rubygems' require 'commandline' class App < CommandLine::Application def initialize < the body from my openining > end end ------------- The code has been stolen from the rdoc of class CommandLine. The only thing, I added to initialize was the statement option :distance, :names => ... w/o this, the code works, but I need an option distance for my app. I don't think, that the error message: ERROR: Unknown option setting 'distance'. follows from the option :version, :names => %w(--version -v) -- Posted via http://www.ruby-forum.com/.