summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authordearblue <[email protected]>2021-01-28 21:40:38 +0900
committerdearblue <[email protected]>2021-01-29 22:27:36 +0900
commit9c36499e311a62f92127829d96f7eb638b49001f (patch)
tree6ac71c4ba5e8131f1cfb874796d1a7a61b24809d /include
parent825241205f07d387ea2490e43de58658cbc35ab6 (diff)
downloadmruby-9c36499e311a62f92127829d96f7eb638b49001f.tar.gz
mruby-9c36499e311a62f92127829d96f7eb638b49001f.zip
Fixed `String#unpack` to handle the highest range of integer values
Previously, problems occurred when the `fixnum` was exceeded. - 32-bit cpu mode with `MRB_WORD_BOXING` and `MRB_INT32`: ```console % bin/mruby -e 'p [0x7fffffff].pack("N").unpack("N")' trace (most recent call last): -e:1: cannot unpack to Integer: 2147483647 (RangeError) ``` - 64-bit cpu mode with `MRB_WORD_BOXING` and `MRB_INT64`: ```console % bin/mruby -e 'p [0x7fffffff_ffffffff].pack("q").unpack("q")' trace (most recent call last): -e:1: cannot unpack to Integer: 9223372036854775807 (RangeError) ```
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions