diff options
| author | tomoya ishida <tomoyapenguin@gmail.com> | 2025-11-12 13:58:38 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-12 13:58:38 +0900 |
| commit | f4f728b319086eea3db6e9909fb9c849c276f813 (patch) | |
| tree | 2e2ab911f6fcfc308c400d7fb85de450c2686ae6 /numeric.c | |
| parent | c5937c1bca72f4fc2642d51bc90bd357d00d264c (diff) | |
[Bug #21680] Fix (base**power_of_two).digits(base) bug (#15144)
Fix wrong condition in base multiplying loop.
Diffstat (limited to 'numeric.c')
| -rw-r--r-- | numeric.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -5553,7 +5553,7 @@ rb_int_digits_bigbase(VALUE num, VALUE base) } bases = rb_ary_new(); - for (VALUE b = base; int_lt(b, num) == Qtrue; b = rb_int_mul(b, b)) { + for (VALUE b = base; int_le(b, num) == Qtrue; b = rb_int_mul(b, b)) { rb_ary_push(bases, b); } digits = rb_ary_new_from_args(1, num); |
