[#107430] [Ruby master Feature#18566] Merge `io-wait` gem into core IO — "byroot (Jean Boussier)" <noreply@...>
Issue #18566 has been reported by byroot (Jean Boussier).
22 messages
2022/02/02
[ruby-core:107411] [Ruby master Bug#18517] 0 << (2**40) is NoMemoryError but 0 << (2**80) is 0
From:
"naruse (Yui NARUSE)" <noreply@...>
Date:
2022-02-01 12:42:02 UTC
List:
ruby-core #107411
Issue #18517 has been updated by naruse (Yui NARUSE).
Backport changed from 2.6: UNKNOWN, 2.7: REQUIRED, 3.0: REQUIRED, 3.1: REQUIRED to 2.6: UNKNOWN, 2.7: REQUIRED, 3.0: REQUIRED, 3.1: DONE
ruby_3_1 1f17463dec2ab1535096cb56005a840eae4fea5b merged revision(s) 6a6227e0168b059c3ed34c9f0ace2e5dc2364221.
----------------------------------------
Bug #18517: 0 << (2**40) is NoMemoryError but 0 << (2**80) is 0
https://bugs.ruby-lang.org/issues/18517#change-96310
* Author: Eregon (Benoit Daloze)
* Status: Closed
* Priority: Normal
* ruby -v: ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x86_64-linux]
* Backport: 2.6: UNKNOWN, 2.7: REQUIRED, 3.0: REQUIRED, 3.1: DONE
----------------------------------------
I've been looking at Integer#{<<,>>} with RHS bignum and long and there are several issues.
This seems a clear bug though:
```
$ruby -e 'p 0 << (2**40)'
-e: failed to allocate memory (NoMemoryError)
$ ruby -e 'p 0 << (2**80)'
0
```
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>