RDoc documentation of iterators

Discussion in 'Ruby' started by Stephan Kämper, May 2, 2004.

  1. Hi all,

    when I run rdoc on my code, I think the iterator doc is slightly wrong -
    or am I wrong?

    If the code is, for example:

    class Foo
    def each
    3.times{ |i| yield i }
    end
    end

    I get this rdoc:

    ....
    Public Instance methods

    each() {|i }| ...}

    I think the 1st '}' shouldn't be there.

    BTW I'm using the 1.8.1-13-rc2 Win installer.

    Happy rubying

    Stephan
    Stephan Kämper, May 2, 2004
    #1
    1. Advertising

  2. On Monday, May 3, 2004, 6:09:03 AM, Stephan wrote:

    > class Foo # :yield: i

    ^^^^^^^^^^^
    > def each
    > 3.times{ |i| yield i }
    > end
    > end


    will get you what you want.

    Cheers,
    Gavin
    Gavin Sinclair, May 2, 2004
    #2
    1. Advertising

  3. Stephan Kämper

    Dave Thomas Guest

    On May 2, 2004, at 15:09, Stephan Kämper wrote:

    > Hi all,
    >
    > when I run rdoc on my code, I think the iterator doc is slightly wrong
    > - or am I wrong?
    >
    > each() {|i }| ...}
    >
    > I think the 1st '}' shouldn't be there.


    That's a bug: I've fixed it in the latest CVS versions.

    Thanks for the report and the testcase.


    Cheers

    Dave
    Dave Thomas, May 3, 2004
    #3
    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. Marcin Kaliciñski

    Iterators and reverse iterators

    Marcin Kaliciñski, May 8, 2005, in forum: C++
    Replies:
    1
    Views:
    475
    Kai-Uwe Bux
    May 8, 2005
  2. , India
    Replies:
    10
    Views:
    1,055
    James Kanze
    Aug 8, 2009
  3. Andreas Schwarz
    Replies:
    6
    Views:
    240
    Randy W. Sims
    Jan 1, 2004
  4. Brian Schröder
    Replies:
    5
    Views:
    126
    Dave Thomas
    Sep 18, 2004
  5. Daniel Berger
    Replies:
    1
    Views:
    138
    Dave Thomas
    Nov 2, 2004
Loading...

Share This Page