Where oh where is Enumerator? (1.9)

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.

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 `’
irb(main):009:0> Enumerable
=> Enumerable

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

David

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

$ ruby19 -e ‘x = Enumerable::Enumerator’
-e:1:in `’: uninitialized constant Enumerable::Enumerator
(NameError)

$ ruby19 -e ‘x = Enumerable’
$

Fabian S. 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 `’: uninitialized constant Enumerable::Enumerator
(NameError)

$ ruby19 -e ‘x = Enumerator’
$

Hi –

On Sun, 23 Aug 2009, Fabian S. wrote:

irb(main):009:0> Enumerable

$ ruby19 -e ‘x = Enumerable’
$

guys, shouldn’t that be Enumerator?

Whoops, yes :slight_smile:

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

David

irb(main):009:0> Enumerable

$ ruby19 -e ‘x = Enumerable’
$

guys, shouldn’t that be Enumerator?

On Aug 22, 10:28 am, “David A. Black” [email protected] 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!

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs