array.rb 250 B

1234567891011121314151617
  1. module V8
  2. class Array < V8::Object
  3. def each
  4. @portal.open do |to|
  5. for i in 0..(@native.Length() - 1)
  6. yield to.rb(@native.Get(i))
  7. end
  8. end
  9. end
  10. def length
  11. @native.Length()
  12. end
  13. end
  14. end