Class: Integer
- Inherits:
-
Object
- Object
- Integer
- Defined in:
- (unknown)
Instance Method Summary collapse
-
#to_js ⇒ JS::Object
Returns
self
as a JS::Object.
Instance Method Details
#to_js ⇒ JS::Object
Returns self
as a JS::Object.
470 471 472 473 474 475 476 |
# File 'ext/js/js-core.c', line 470 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"); } } |