[MacRuby-devel] Calling Block-based C APIs with Ruby Procs
Saul Mora
saul at casademora.com
Tue Dec 7 15:55:41 PST 2010
Hello,
I've installed the latest nightly build from 12/7, and tried running the
sample code from the last blog post regarding calling [NSArray
enumerateObjectsUsingBlock:] from with macirb. I successfully get a
segfault every time I run the sample:
framework 'Foundation'
a = [1, 2, 3, 4, 5]
a.enumerateObjectsUsingBlock(Proc.new { |obj, index, stop|
p obj
stop.assign(true) if index == 2
})
Has anything changed since that sample code was posted?
Thanks,
Saul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20101207/f868faa0/attachment.html>
More information about the MacRuby-devel
mailing list