Issue #17186 has been updated by jeremyevans0 (Jeremy Evans).

Status changed from Open to Closed

Fixed in commit:f7bd9f075030e5fa876320c1624a80685a636e82

----------------------------------------
Bug #17186: Integer overflow in "chr" error message (out of char range)
https://bugs.ruby-lang.org/issues/17186#change-87908

* Author: semaperepelitsa (Simon Perepelitsa)
* Status: Closed
* Priority: Normal
* ruby -v: ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-darwin19]
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN
----------------------------------------
Example:

```
irb(main):001:0> 300_000_000.chr
RangeError (300000000 out of char range)
irb(main):002:0> 3_000_000_000.chr
RangeError (-1294967296 out of char range)
irb(main):003:0> 30_000_000_000.chr
RangeError (30000000000 out of char range)
```




-- 
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>