Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > ruby-dev summary 25045-25260

Reply
Thread Tools

ruby-dev summary 25045-25260

 
 
Takaaki Tateishi
Guest
Posts: n/a
 
      12-22-2004
Dear all,

Here is a brief summary of recent articles posted on ruby-dev.


[ruby-dev:25048] about optparse specification

Minero Aoki claimed that optparse should not handle -L when --line
is given. It appears that anyone is not interested in this issue,
since there is no reply so far.

[ruby-dev:25075] status of defects

Shugo Maeda informed us that status on bug reports listed at
http://mput.dip.jp/rubybugs is automatically changed to 'fixed'
when we put down a string like "[ruby-dev:12345]" into a commit
log.

[ruby-dev:25101] non-stdio buffering

Akira Tanaka summarized issues on non-stdio buffering, which is
introduced for ruby-1.9. This new IO buffering mechanism affects
some extension libraries.

[ruby-dev:25193] 1.8.2 release schedule

Matz has a plan to release ruby-1.8.2 on Dec 24.
--
Takaaki Tateishi <>


 
Reply With Quote
 
 
 
 
Austin Ziegler
Guest
Posts: n/a
 
      12-22-2004
On Thu, 23 Dec 2004 00:13:52 +0900, Takaaki Tateishi <> wrote:
> [ruby-dev:25048] about optparse specification
> Minero Aoki claimed that optparse should not handle -L when --line
> is given. It appears that anyone is not interested in this issue,
> since there is no reply so far.


Can you explain this a bit? If I do this:

ARGV.options do |opts|
opts.on('-L', '--line', ...) { |xx| ... }
end

Then it should. However, IMO optparse should NOT autovivify -L if I
specify:

ARGV.options do |opts|
opts.on('--line', ...) { |xx| ... }
end

Or is this something else entirely?

-austin
--
Austin Ziegler *
* Alternate:


 
Reply With Quote
 
 
 
 
Takaaki Tateishi
Guest
Posts: n/a
 
      12-22-2004
Austin Ziegler wrote:
> Then it should. However, IMO optparse should NOT autovivify -L if I
> specify:
>
> ARGV.options do |opts|
> opts.on('--line', ...) { |xx| ... }
> end


That's just it except for missing opts.parse!.
--
Takaaki Tateishi <>


 
Reply With Quote
 
nobu.nokada@softhome.net
Guest
Posts: n/a
 
      12-22-2004
Hi,

At Thu, 23 Dec 2004 00:28:15 +0900,
Austin Ziegler wrote in [ruby-talk:124301]:
> > [ruby-dev:25048] about optparse specification
> > Minero Aoki claimed that optparse should not handle -L when --line
> > is given. It appears that anyone is not interested in this issue,
> > since there is no reply so far.

>
> Can you explain this a bit? If I do this:
>
> ARGV.options do |opts|
> opts.on('-L', '--line', ...) { |xx| ... }
> end
>
> Then it should. However, IMO optparse should NOT autovivify -L if I
> specify:
>
> ARGV.options do |opts|
> opts.on('--line', ...) { |xx| ... }
> end
>
> Or is this something else entirely?


Yes, and I'd changed the behavior as you and Aoki claimed.

--
Nobu Nakada


 
Reply With Quote
 
Minero Aoki
Guest
Posts: n/a
 
      12-22-2004
Hi,

In mail "Re: ruby-dev summary 25045-25260"
Austin Ziegler <> wrote:

> > [ruby-dev:25048] about optparse specification
> > Minero Aoki claimed that optparse should not handle -L when --line
> > is given. It appears that anyone is not interested in this issue,
> > since there is no reply so far.

>
> Can you explain this a bit? If I do this:
>
> ARGV.options do |opts|
> opts.on('-L', '--line', ...) { |xx| ... }
> end
>
> Then it should. However, IMO optparse should NOT autovivify -L if I
> specify:
>
> ARGV.options do |opts|
> opts.on('--line', ...) { |xx| ... }
> end


I said latter. From ruby-dev:25048:

~ % cat t
require 'optparse'
parser = OptionParser.new
parser.on('--line') {
puts 'opt=--line'
}
parser.parse!

~ % ruby t -l
opt=--line
~ % ruby t --l
opt=--line
~ % ruby t -L
opt=--line
~ % ruby t --L
opt=--line


But, thanks for nobu, it seems that optparse.rb was modified after
[ruby-dev:25048] was posted. We get following result now:

% cat t
require 'optparse'

parser = OptionParser.new
parser.on('--line') {
puts 'opt=--line'
}
parser.parse!

% ruby t -L
/usr/lib/ruby/1.9/optparse.rb:1440:in `complete': invalid option: -L (OptionParser::InvalidOption)
from /usr/lib/ruby/1.9/optparse.rb:1438:in `catch'
from /usr/lib/ruby/1.9/optparse.rb:1438:in `complete'
from /usr/lib/ruby/1.9/optparse.rb:1297:in `order!'
from /usr/lib/ruby/1.9/optparse.rb:1266:in `catch'
from /usr/lib/ruby/1.9/optparse.rb:1266:in `order!'
from /usr/lib/ruby/1.9/optparse.rb:1346:in `permute!'
from /usr/lib/ruby/1.9/optparse.rb:1373:in `parse!'
from t:7

From ChangeLog:

Sun Dec 5 19:39:17 2004 Nobuyoshi Nakada <>

* lib/optparse.rb (OptionParser::Completion#complete): new parameter
to direct case insensitiveness.

* lib/optparse.rb (OptionParser#order!): ignore case only for long
option. [ruby-dev:25048]


Regards,
Minero Aoki


 
Reply With Quote
 
Austin Ziegler
Guest
Posts: n/a
 
      12-22-2004
On Thu, 23 Dec 2004 00:53:08 +0900, Takaaki Tateishi <> wrote:
> Austin Ziegler wrote:
> > Then it should. However, IMO optparse should NOT autovivify -L if I
> > specify:
> >
> > ARGV.options do |opts|
> > opts.on('--line', ...) { |xx| ... }
> > end

>
> That's just it except for missing opts.parse!.


Well, yes. So if I have --line, will optparse do -L automatically, or
will it not? And what was Minero wanting from this if it doesn't do -L
automatically?

-austin
--
Austin Ziegler *
* Alternate:


 
Reply With Quote
 
Minero Aoki
Guest
Posts: n/a
 
      12-22-2004
Hi,

In mail "Re: ruby-dev summary 25045-25260"
Austin Ziegler <> wrote:

> > > Then it should. However, IMO optparse should NOT autovivify -L if I
> > > specify:
> > >
> > > ARGV.options do |opts|
> > > opts.on('--line', ...) { |xx| ... }
> > > end

> >
> > That's just it except for missing opts.parse!.

>
> Well, yes. So if I have --line, will optparse do -L automatically, or
> will it not? And what was Minero wanting from this if it doesn't do -L
> automatically?


-L should raise error (and it does).

Regards,
Minero Aoki


 
Reply With Quote
 
Austin Ziegler
Guest
Posts: n/a
 
      12-22-2004
On Thu, 23 Dec 2004 00:56:12 +0900, Minero Aoki
<> wrote:
>>> [ruby-dev:25048] about optparse specification
>>> Minero Aoki claimed that optparse should not handle -L when
>>> --line is given. It appears that anyone is not interested in
>>> this issue, since there is no reply so far.

>> Can you explain this a bit? If I do this:

[...]
> I said latter. From ruby-dev:25048:
>
> ~ % cat t
> require 'optparse'
> parser = OptionParser.new
> parser.on('--line') {
> puts 'opt=--line'
> }
> parser.parse!
>
> ~ % ruby t -l
> opt=--line
> ~ % ruby t --l
> opt=--line
> ~ % ruby t -L
> opt=--line
> ~ % ruby t --L
> opt=--line
>
> But, thanks for nobu, it seems that optparse.rb was modified after
> [ruby-dev:25048] was posted. We get following result now:


Excellent!

If one wants something similar to this, couldn't one do:

require 'optparse'

parser = Option.parser.new
parser.on('--l[ine]') { puts 'opt=--l[ine]' }
parser.parse!

?

Thanks muchly,
-austin
--
Austin Ziegler *
* Alternate:


 
Reply With Quote
 
Aredridel
Guest
Posts: n/a
 
      12-22-2004
> [ruby-dev:25048] about optparse specification
>
> Minero Aoki claimed that optparse should not handle -L when --line
> is given. It appears that anyone is not interested in this issue,
> since there is no reply so far.


Ach, that would totally throw me for a loop. I would expect -L to be
totally separate. I agree with Minero Aoki.

Ari


 
Reply With Quote
 
nobu.nokada@softhome.net
Guest
Posts: n/a
 
      12-23-2004
Hi,

At Thu, 23 Dec 2004 01:02:32 +0900,
Austin Ziegler wrote in [ruby-talk:124317]:
> If one wants something similar to this, couldn't one do:
>
> require 'optparse'
>
> parser = Option.parser.new
> parser.on('--l[ine]') { puts 'opt=--l[ine]' }
> parser.parse!
>
> ?


Making -L equal to --line?

parser.on('--line', '-L') { puts 'opt=--line' }

--
Nobu Nakada


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Thunderbird--takes so long to build summary file GLC Firefox 1 11-15-2005 05:10 AM
how to force Mozilla 1.7 to rebuild all email index/summary files? Marvin Glenn, ASNN Firefox 1 06-23-2004 11:08 PM
Inbox summary file constantly rebuilt Leif K-Brooks Firefox 3 05-18-2004 04:26 AM
Comments requested: brief summary of Perl Adam Barr Perl 1 02-24-2004 06:03 PM
validation summary doesnt display when there's client-side validation Libs ASP .Net 0 06-25-2003 03:05 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57