[MacRuby-devel] C-level blocks (issue #712)?
Joel Reymont
joelr1 at gmail.com
Tue Jan 11 10:01:19 PST 2011
On Jan 11, 2011, at 5:40 PM, Rolando Abarca wrote:
> I'm using MacRuby 0.8
Works for me!
macruby -version
MacRuby 0.9 (ruby 1.9.2) [universal-darwin10.0, x86_64]
macirb
irb(main):001:0> framework 'Foundation'
=> true
irb(main):002:0> a = [1,2,3,4,5]
=> [1, 2, 3, 4, 5]
irb(main):003:0> a.enumerateObjectsUsingBlock(Proc.new { |obj, index, stop|
irb(main):004:1> p obj
irb(main):005:1> stop.assign(true) if index == 2
irb(main):006:1> })
1
2
3
=> [1, 2, 3, 4, 5]
---
http://wagerlabs.com | @wagerlabs | http://www.linkedin.com/in/joelreymont
More information about the MacRuby-devel
mailing list