Actions
Bug #21680
closedInteger#digits bug starting from Ruby 3.1
Bug #21680:
Integer#digits bug starting from Ruby 3.1
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 3.3.10 (2025-10-23 revision 343ea05002) [amd64-freebsd14]
Description
(2**512).digits(256).last
The result was 1 on Ruby 3.0. Starting from Ruby 3.1 it turned to 256 (which can't possibly be right).
Updated by tompng (tomoya ishida) 18 days ago
Pull request https://github.com/ruby/ruby/pull/15144
Updated by tompng (tomoya ishida) 18 days ago
- Status changed from Open to Closed
Applied in changeset git|f4f728b319086eea3db6e9909fb9c849c276f813.
[Bug #21680] Fix (base**power_of_two).digits(base) bug (#15144)
Fix wrong condition in base multiplying loop.
Updated by nagachika (Tomoyuki Chikanaga) 18 days ago
- Backport changed from 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN to 3.2: REQUIRED, 3.3: REQUIRED, 3.4: REQUIRED
Updated by nagachika (Tomoyuki Chikanaga) about 6 hours ago
- Backport changed from 3.2: REQUIRED, 3.3: REQUIRED, 3.4: REQUIRED to 3.2: REQUIRED, 3.3: DONE, 3.4: REQUIRED
ruby_3_3 bc21e4d40daeb962699340162547e0fb2b50107f merged revision(s) f4f728b319086eea3db6e9909fb9c849c276f813.
Actions