1
0
Fork 0
mirror of https://github.com/rubyjs/therubyracer synced 2023-03-27 23:21:42 -04:00
therubyracer/lib/v8/conversion/array.rb

11 lines
197 B
Ruby
Raw Normal View History

class V8::Conversion
module Array
def to_v8
array = V8::Array.new(length)
each_with_index do |item, i|
array[i] = item
end
return array.to_v8
end
end
end