[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

ruby-dev summary 25045-25260

Takaaki Tateishi

12/22/2004 3:14:00 PM

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.j... 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 <ttate@ttsky.net>


9 Answers

Austin Ziegler

12/22/2004 3:28:00 PM

0

On Thu, 23 Dec 2004 00:13:52 +0900, Takaaki Tateishi <ttate@ttsky.net> 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 * halostatue@gmail.com
* Alternate: austin@halostatue.ca


Takaaki Tateishi

12/22/2004 3:53:00 PM

0

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 <ttate@ttsky.net>


nobu.nokada

12/22/2004 3:56:00 PM

0

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


Minero Aoki

12/22/2004 3:56:00 PM

0

Austin Ziegler

12/22/2004 3:57:00 PM

0

On Thu, 23 Dec 2004 00:53:08 +0900, Takaaki Tateishi <ttate@ttsky.net> 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 * halostatue@gmail.com
* Alternate: austin@halostatue.ca


Minero Aoki

12/22/2004 4:00:00 PM

0

Austin Ziegler

12/22/2004 4:03:00 PM

0

On Thu, 23 Dec 2004 00:56:12 +0900, Minero Aoki
<aamine@loveruby.net> 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 * halostatue@gmail.com
* Alternate: austin@halostatue.ca


Aredridel

12/22/2004 8:14:00 PM

0

> [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


nobu.nokada

12/23/2004 12:50:00 AM

0

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