Sha256: d49becf68caaf034832c3cdbc1bbe10760401472b64dc626817af8bf33c71412

Contents?: true

Size: 627 Bytes

Versions: 37

Compression:

Stored size: 627 Bytes

Contents

#include "rr.h"

namespace rr {

void Array::Init() {
  ClassBuilder("Array", Object::Class).
    defineSingletonMethod("New", &New).
    defineMethod("Length", &Length).
    defineMethod("CloneElementAt", &CloneElementAt).
    store(&Class);
}

VALUE Array::New(int argc, VALUE argv[], VALUE self) {
  VALUE length; rb_scan_args(argc, argv, "01", &length);
  return Array(v8::Array::New(RTEST(length) ? NUM2INT(length) : 0));
}

VALUE Array::Length(VALUE self) {
  return UInt32(Array(self)->Length());
}

VALUE Array::CloneElementAt(VALUE self, VALUE index) {
  return Object(Array(self)->CloneElementAt(UInt32(index)));
}

}

Version data entries

37 entries across 37 versions & 8 rubygems

Version Path
arcabouco-0.2.13 vendor/bundle/gems/therubyracer-0.12.2/ext/v8/array.cc
therubyracer-0.12.3 ext/v8/array.cc
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/therubyracer-0.11.4/ext/v8/array.cc
therubyracer-xcode-0.12.3 ext/v8/array.cc
therubyracer-xcode-0.12.2 ext/v8/array.cc
therubyracer-tmpfork-0.12.2 ext/v8/array.cc
sc_core-0.0.7 test/dummy/vendor/bundle/ruby/2.2.0/gems/therubyracer-0.12.2/ext/v8/array.cc
therubyracer-0.12.2 ext/v8/array.cc
therubyracer-0.12.1 ext/v8/array.cc
therubyracer-discourse-0.12.0 ext/v8/array.cc
therubyracer-0.12.0 ext/v8/array.cc
therubyracer-0.11.4 ext/v8/array.cc
therubyracer-0.11.3 ext/v8/array.cc
therubyracer-0.11.2 ext/v8/array.cc
sunrise-cms-0.5.0.rc1 vendor/bundle/ruby/1.9.1/gems/therubyracer-0.11.0/ext/v8/array.cc
therubyracer-0.11.1 ext/v8/array.cc
therubyracer-0.11.1beta1 ext/v8/array.cc
therubyracer-0.11.0 ext/v8/array.cc
therubyracer-0.11.0beta8-x86-freebsd-9 ext/v8/array.cc
therubyracer-0.11.0beta8-x86_64-linux ext/v8/array.cc