From: Dave Baldwin Date: 2008-10-23T19:54:18+09:00 Subject: Expected difference between 1.8 and 1.9? Couldn't find anything in the change notes. ruby -v ruby 1.8.6 (2008-03-03 patchlevel 114) [universal-darwin9.0] a = *[10] => a = 10 macruby -v MacRuby version 0.3 (ruby 1.9.0 2008-06-03) [universal-darwin9.0] a = *[10] => a = [10] May be a problem with macruby though. Dave. On 23 Oct 2008, at 10:27, Luca Peduto wrote: > Hi, > great gem! > Only one question: is it possible to use trollop on Windows machine? > when I run this code on a XP machine (ruby t.rb --help): > ---------- start code ------------------------ > require 'trollop' > opts = Trollop::options do > version "test 1.2.3 (c) 2008 William Morgan" > banner <<-EOS > Test is an awesome program that does something very, very important. > > Usage: > test [options] + > where [options] are: > EOS > > opt :ignore, "Ignore incorrect values" > opt :file, "Extra data filename to read in, with a very long option > description like this one", :type => String > opt :volume, "Volume level", :default => 3.0 > opt :iters, "Number of iterations", :default => 5 > end > Trollop::die :volume, "must be non-negative" if opts[:volume] < 0 > Trollop::die :file, "must exist" unless File.exist?(opts[:file]) if > opts[:file] > --------- end code --------------------------------- > > i obtain this error message: > > C:/Ruby/lib/ruby/gems/1.8/gems/trollop-1.10.1/lib/trollop.rb:504:in > ``': No such file or directory - > stty size (Errno::ENOENT) > from C:/Ruby/lib/ruby/gems/1.8/gems/trollop-1.10.1/lib/ > trollop.rb:504:in > `width' > from C:/Ruby/lib/ruby/gems/1.8/gems/trollop-1.10.1/lib/ > trollop.rb:521:in > `educate' > from C:/Ruby/lib/ruby/gems/1.8/gems/trollop-1.10.1/lib/ > trollop.rb:657:in > `options' > from t.rb:3 > > Any hints? Maybe I need curses library? > Thanks > > Luca > > On Thu, Oct 23, 2008 at 7:40 AM, wmorgan-ruby-talk@masanjin.net > wrote: >> Reformatted excerpts from rogerpack2005's message of 2008-10-21: >>> Thanks for trollop. It has quickly become quite popular at my >>> workplace. >> >> Glad to hear it! >> -- >> William >> >> >