class Integer

Public Instance Methods

to_js → JS::Object click to toggle source

Returns self as a JS::Object.

static VALUE _rb_js_integer_to_js(VALUE obj) {
  if (FIXNUM_P(obj)) {
    return jsvalue_s_new(rb_js_abi_host_int_to_js_number(FIX2LONG(obj)));
  } else {
    rb_raise(rb_eTypeError, "can't convert Bignum to JS::Object");
  }
}