[MacRuby-devel] [MacRuby] #817: External iterators returning nil
MacRuby
ruby-noreply at macosforge.org
Thu Jul 29 06:22:11 PDT 2010
#817: External iterators returning nil
-----------------------------------+----------------------------------------
Reporter: kennylovrin@… | Owner: lsansonetti@…
Type: defect | Status: new
Priority: minor | Milestone:
Component: MacRuby | Keywords:
-----------------------------------+----------------------------------------
Trying to use the "next" method of an external iterator showed the
following problem:
iMac:~ kenny$ macruby -v
MacRuby 0.7 (ruby 1.9.2) [universal-darwin10.0, x86_64]
iMac:~ kenny$ macirb
irb(main):001:0> i = ["one", "two"].each
=> #<Enumerator:0x2000faa60>
irb(main):002:0> i.next
=> nil
irb(main):003:0> i.next
=> nil
irb(main):004:0>
iMac:~ kenny$ ruby -v
ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]
iMac:~ kenny$ irb
>> i = ["one", "two"].each
=> #<Enumerable::Enumerator:0x101270900>
>> i.next
=> "one"
>> i.next
=> "two"
>>
As I understand, this is a defect as I haven't found any indications that
it shouldn't work?
--
Ticket URL: <http://www.macruby.org/trac/ticket/817>
MacRuby <http://macruby.org/>
More information about the MacRuby-devel
mailing list