Where oh where is Enumerator? (1.9)

Discussion in 'Ruby' started by Intransition, Aug 22, 2009.

  1. Intransition

    Intransition Guest

    Err... in Ruby 1.9 is Enumerator at the toplevel or in the Enumerable
    namespace? Seems to me it was moved to the toplevel at one point, but
    now it looks like it's in Enumerable again... then again I may have
    that all backwards. Can someone confirm?

    Thanks.
     
    Intransition, Aug 22, 2009
    #1
    1. Advertising

  2. Hi --

    On Sat, 22 Aug 2009, Intransition wrote:

    > Err... in Ruby 1.9 is Enumerator at the toplevel or in the Enumerable
    > namespace? Seems to me it was moved to the toplevel at one point, but
    > now it looks like it's in Enumerable again... then again I may have
    > that all backwards. Can someone confirm?


    I don't think it's back in Enumerable:

    irb(main):007:0> RUBY_DESCRIPTION
    => "ruby 1.9.2dev (2009-08-22 trunk 24620) [i686-linux]"
    irb(main):008:0> Enumerable::Enumerator
    NameError: uninitialized constant Enumerable::Enumerator
    from (irb):8
    from /usr/local/lib/ruby-snapshot/bin/irb:12:in `<main>'
    irb(main):009:0> Enumerable
    => Enumerable

    (Courtesy of ruby-versions.net and its nightly trunk snapshots :)


    David

    --
    David A. Black / Ruby Power and Light, LLC / http://www.rubypal.com
    Q: What's the best way to get a really solid knowledge of Ruby?
    A: Come to our Ruby training in Edison, New Jersey, September 14-17!
    Instructors: David A. Black and Erik Kastner
    More info and registration: http://rubyurl.com/vmzN
     
    David A. Black, Aug 22, 2009
    #2
    1. Advertising

  3. Intransition

    7stud -- Guest

    $ ruby19 -v
    ruby 1.9.1p243 (2009-07-16 revision 24175) [i386-darwin8.11.1]

    $ ruby19 -e 'x = Enumerable::Enumerator'
    -e:1:in `<main>': uninitialized constant Enumerable::Enumerator
    (NameError)

    $ ruby19 -e 'x = Enumerable'
    $

    --
    Posted via http://www.ruby-forum.com/.
     
    7stud --, Aug 22, 2009
    #3
  4. [Note: parts of this message were removed to make it a legal post.]

    >
    > irb(main):009:0> Enumerable
    >



    > $ ruby19 -e 'x = Enumerable'
    > $
    >


    guys, shouldn't that be Enumerator?
     
    Fabian Streitel, Aug 22, 2009
    #4
  5. Intransition

    7stud -- Guest

    Fabian Streitel wrote:
    >>
    >> irb(main):009:0> Enumerable
    >>

    >
    >
    >> $ ruby19 -e 'x = Enumerable'
    >> $
    >>

    >
    > guys, shouldn't that be Enumerator?


    Yes.

    $ ruby19 -v
    ruby 1.9.1p243 (2009-07-16 revision 24175) [i386-darwin8.11.1]

    $ ruby19 -e 'x = Enumerable::Enumerator'
    -e:1:in `<main>': uninitialized constant Enumerable::Enumerator
    (NameError)

    $ ruby19 -e 'x = Enumerator'
    $

    --
    Posted via http://www.ruby-forum.com/.
     
    7stud --, Aug 22, 2009
    #5
  6. Hi --

    On Sun, 23 Aug 2009, Fabian Streitel wrote:

    >>
    >> irb(main):009:0> Enumerable
    >>

    >
    >
    >> $ ruby19 -e 'x = Enumerable'
    >> $
    >>

    >
    > guys, shouldn't that be Enumerator?


    Whoops, yes :)

    irb(main):001:0> Enumerator
    => Enumerator


    David

    --
    David A. Black / Ruby Power and Light, LLC / http://www.rubypal.com
    Q: What's the best way to get a really solid knowledge of Ruby?
    A: Come to our Ruby training in Edison, New Jersey, September 14-17!
    Instructors: David A. Black and Erik Kastner
    More info and registration: http://rubyurl.com/vmzN
     
    David A. Black, Aug 22, 2009
    #6
  7. Intransition

    Trans Guest

    On Aug 22, 10:28=A0am, "David A. Black" <> wrote:
    > Hi --
    >
    > On Sat, 22 Aug 2009, Intransition wrote:
    > > Err... in Ruby 1.9 is Enumerator at the toplevel or in the Enumerable
    > > namespace? Seems to me it was moved to the toplevel at one point, but
    > > now it looks like it's in Enumerable again... then again I may have
    > > that all backwards. Can someone confirm?

    >
    > I don't think it's back in Enumerable:


    Thanks!
     
    Trans, Aug 22, 2009
    #7
    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. =?Utf-8?B?SmltIEhlYXZleQ==?=

    Char Enumerator

    =?Utf-8?B?SmltIEhlYXZleQ==?=, Jul 16, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    400
    bruce barker
    Jul 16, 2004
  2. Angelos Karantzalis

    DataGrid: Bind to an Enumerator of object[]'s

    Angelos Karantzalis, Nov 4, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    455
  3. Thomas Hawtin
    Replies:
    7
    Views:
    399
    Roedy Green
    May 20, 2006
  4. Oliver Hopton

    Collection class bound to DataGrid doesn't use my custom enumerator!

    Oliver Hopton, Oct 1, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    135
    Alan Green
    Oct 29, 2003
  5. Kristof Bastiaensen

    RCR: More enumerator functionality

    Kristof Bastiaensen, May 17, 2004, in forum: Ruby
    Replies:
    10
    Views:
    308
    Kristof Bastiaensen
    May 19, 2004
Loading...

Share This Page