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

don't use integer conversions. All JS Numbers are internally represented as 64bit doubles anyway.

This commit is contained in:
Charles Lowell 2010-08-24 22:15:01 -05:00
parent 62ff07719f
commit 42507e4daf

View file

@ -118,7 +118,8 @@ VALUE rr_v82rb(int32_t value) {
Handle<Value> rr_rb2v8(VALUE value) {
switch (TYPE(value)) {
case T_FIXNUM:
return Integer::New(FIX2LONG(value));
// TODO: use this conversion if value will fit in 32 bits.
// return Integer::New(FIX2LONG(value));
case T_FLOAT:
return Number::New(NUM2DBL(value));
case T_STRING: