diff options
| author | KOBAYASHI Shuji <[email protected]> | 2019-12-01 21:56:26 +0900 |
|---|---|---|
| committer | KOBAYASHI Shuji <[email protected]> | 2019-12-01 22:09:38 +0900 |
| commit | a53f28275e14202ed2741920fcc32b9e2168d3d4 (patch) | |
| tree | cd2d0d8cfd5afcb5294fb4eb3c7c8697c6921ad8 /src/value_array.h | |
| parent | ef95a9fa93d4f9f8c0824e93486115dbefeee3a0 (diff) | |
| download | mruby-a53f28275e14202ed2741920fcc32b9e2168d3d4.tar.gz mruby-a53f28275e14202ed2741920fcc32b9e2168d3d4.zip | |
Fix `MRB_FIXNUM_SHIFT` with `MRB_WORD_BOXING`, `MRB_INT32` and `MRB_64BIT`
### Example
```ruby
# example.rb
max32 = 2**30 - 1 + 2**30
min32 = -max32-1
[max32, max32+1, min32, min32-1].each{|n| p [n, n.class]}
```
#### Before this patch:
```
$ bin/mruby example.rb
[2147483647, Float]
[2147483648, Float]
[-2147483648, Float]
[-2147483649, Float]
```
#### After this patch:
```
$ bin/mruby example.rb
[2147483647, Fixnum]
[2147483648, Float]
[-2147483648, Fixnum]
[-2147483649, Float]
```
Diffstat (limited to 'src/value_array.h')
0 files changed, 0 insertions, 0 deletions
