[MacRuby-devel] [macruby] #81: Enumerable::Enumerator seems to be broken
macruby
ruby-noreply at macosforge.org
Sat Jun 21 07:56:01 PDT 2008
#81: Enumerable::Enumerator seems to be broken
-------------------------------+--------------------------------------------
Reporter: flatter at gmail.com | Owner: lsansonetti at apple.com
Type: defect | Status: new
Priority: blocker | Milestone:
Component: MacRuby | Keywords:
-------------------------------+--------------------------------------------
Hi there,
Enumerators seem to be broken in trunk (did not try 0.2). Perhaps I'm
using them the wrong way but anyways "at least it should not crash"
(greetings to lrz).
'''Code sample:'''
{{{
arr = [:a, :b, :c, :d]
enum = arr.map!
while(el = enum.next) do
puts el
end
}}}
'''Output:'''
{{{
foo.rb:4: [BUG] Segmentation fault
MacRuby version 0.3 (ruby 1.9.0 2008-06-03) [universal-darwin9.3]
-- stack frame ------------
0000 (0x30030): 00000004
0001 (0x30034): 00000001
0002 (0x30038): 00000004
0003 (0x3003c): 00000001
0004 (0x30040): 010c39f0
0005 (0x30044): 010c3a90
0006 (0x30048): 00000004
0007 (0x3004c): 00000004
0008 (0x30050): 00000001
0009 (0x30054): 010c3a90
0010 (0x30058): 00000004
0011 (0x3005c): 010c3d20
-- control frame ----------
c:0004 p:---- s:0012 b:0012 l:002478 d:002478 CFUNC :next
c:0003 p:0038 s:0009 b:0009 l:000008 d:000008 TOP foo.rb:4
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH :inherited
c:0001 p:0000 s:0002 b:0002 l:000001 d:000001 TOP
---------------------------
DBG> : "foo.rb:4:in `next'"
DBG> : "foo.rb:4:in `<main>'"
-- backtrace of native function call (Use addr2line) --
0x2b63d6
0x1df14c
0x1df18b
0x270311
0x9123309b
0xffffffff
0x2bc096
0x2bc210
0x1de90a
0x2a4df1
0x2a8ab8
0x1e
-------------------------------------------------------
}}}
--
Ticket URL: <http://ruby.macosforge.org/trac/ticket/81>
macruby <http://ruby.macosforge.org/>
More information about the MacRuby-devel
mailing list