Project

General

Profile

Actions

Feature #14378

open

Increase Fixnum range on Windows from 31 bits to 63 bits

Added by HfCloud (Xiangyu Shi) over 3 years ago. Updated 3 months ago.

Status:
Open
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:84940]
Tags:

Description

On windows, start an IRB of a 64-bits ruby, enter these code:

(1<<29).equal?(1<<29) 
#=>true

(1<<30).equal?(1<<30)
#=>false

So, it is that FIXNUM of the 64-bits ruby is a 32-bits data?
But my friend try these code on linux platform and all got true(it means FIXNUM is 64bits)
Then I opened ruby/ruby.h and found this:

#define RUBY_FIXNUM_MAX (LONG_MAX>>1)

The LONG_MAX of my compiler(msvc140, vs2017) is 2147483647, and the ruby which is installed by ruby-installer also have the same problem.

Actions

Also available in: Atom PDF