ruby-dev summary 25045-25260

Discussion in 'Ruby' started by Takaaki Tateishi, Dec 22, 2004.

  1. 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 <>
    Takaaki Tateishi, Dec 22, 2004
    #1
    1. Advertising

  2. 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:
    Austin Ziegler, Dec 22, 2004
    #2
    1. Advertising

  3. 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 <>
    Takaaki Tateishi, Dec 22, 2004
    #3
  4. Takaaki Tateishi

    Guest

    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
    , Dec 22, 2004
    #4
  5. Takaaki Tateishi

    Minero Aoki Guest

    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
    Minero Aoki, Dec 22, 2004
    #5
  6. 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:
    Austin Ziegler, Dec 22, 2004
    #6
  7. Takaaki Tateishi

    Minero Aoki Guest

    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
    Minero Aoki, Dec 22, 2004
    #7
  8. 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:
    Austin Ziegler, Dec 22, 2004
    #8
  9. Takaaki Tateishi

    Aredridel Guest

    > [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
    Aredridel, Dec 22, 2004
    #9
  10. Takaaki Tateishi

    Guest

    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
    , Dec 23, 2004
    #10
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kazuo Saito

    ruby-dev summary 20418 - 20487

    Kazuo Saito, Jul 1, 2003, in forum: Ruby
    Replies:
    0
    Views:
    76
    Kazuo Saito
    Jul 1, 2003
  2. TAKAHASHI Masayoshi

    ruby-dev summary 20489 - 20519

    TAKAHASHI Masayoshi, Jul 9, 2003, in forum: Ruby
    Replies:
    0
    Views:
    77
    TAKAHASHI Masayoshi
    Jul 9, 2003
  3. Kazuo Saito

    ruby-dev summary 20715-20940

    Kazuo Saito, Jul 29, 2003, in forum: Ruby
    Replies:
    0
    Views:
    84
    Kazuo Saito
    Jul 29, 2003
  4. TAKAHASHI Masayoshi

    ruby-dev summary 20941-21133

    TAKAHASHI Masayoshi, Aug 7, 2003, in forum: Ruby
    Replies:
    0
    Views:
    80
    TAKAHASHI Masayoshi
    Aug 7, 2003
  5. Shashank Date

    ruby-dev summary 21134-21191

    Shashank Date, Aug 14, 2003, in forum: Ruby
    Replies:
    2
    Views:
    82
    NAKAMURA, Hiroshi
    Aug 15, 2003
Loading...

Share This Page