[Rubygems-developers] Optparse library

Gavin Sinclair gsinclair at soyabean.com.au
Wed Oct 6 08:46:20 EDT 2004


On Wednesday, October 6, 2004, 7:06:48 PM, Hugh wrote:

>> On Wednesday, October 6, 2004, 1:15:10 AM, Hugh wrote:
>>
>> Ruby's 'optparse' library is [= ] agnostic, which is nice.

> On the subject: 
> http://rubyforge.org/tracker/index.php?func=detail&aid=928&group_id=126&atid=575

Copied from RubyGems bug report for sake of discussion:

======================== 8< ===============================================

I get this when I run gem list

brains hgs 676 %> gem list
/usr/local/lib/ruby/site_ruby/optparse.rb:1001: warning: character class has `]' without escape
/usr/local/lib/ruby/site_ruby/optparse.rb:1001: warning: character class has `[' without escape
/usr/local/lib/ruby/site_ruby/optparse.rb:1011: warning: character class has `]' without escape
/usr/local/lib/ruby/site_ruby/optparse.rb:1011: warning: character class has `[' without escape
/usr/local/lib/ruby/site_ruby/optparse.rb:1023: warning: character class has `]' without escape
/usr/local/lib/ruby/site_ruby/optparse.rb:1023: warning: character class has `[' without escape

*** LOCAL GEMS ***

rake (0.4.8)
Ruby based make-like utility.

...

======================== 8< ===============================================

I've never seen output like that before!!  Are there other factors which
could be causing this?  Anyone else got any ideas or reports?

I edited my /usr/local/bin/gem so that it ran with -w and
$VERBOSE=true, but could not get those optparse warnings.

For me: ruby 1.8.2 (2004-05-16) [i386-cygwin]

> I thought my optparse was too old, but I can't find a new one.
> Maybe we should unset $-w when requiring it?

There's no optparse except the standard library one, AFAIK.

Gavin



More information about the Rubygems-developers mailing list