summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2021-04-21 22:08:07 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2021-04-21 22:08:07 +0900
commit91c4ac8d664a3566f7473a58c7f3421ce878198c (patch)
tree3c504cab0bfaf8a73af42707e11d2321683d0ae9 /src
parent5cf1de5b3167322ff39783275233d0b8aeed2dd1 (diff)
downloadmruby-91c4ac8d664a3566f7473a58c7f3421ce878198c.tar.gz
mruby-91c4ac8d664a3566f7473a58c7f3421ce878198c.zip
numeric.c: update error messages in `int_pow`; ref #5420
Diffstat (limited to 'src')
-rw-r--r--src/numeric.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/numeric.c b/src/numeric.c
index be7608e3c..dfd5e14eb 100644
--- a/src/numeric.c
+++ b/src/numeric.c
@@ -103,13 +103,13 @@ int_pow(mrb_state *mrb, mrb_value x)
for (;;) {
if (exp & 1) {
if (mrb_int_mul_overflow(result, base, &result)) {
- int_overflow(mrb, "multiplication");
+ int_overflow(mrb, "power");
}
}
exp >>= 1;
if (exp == 0) break;
if (mrb_int_mul_overflow(base, base, &base)) {
- int_overflow(mrb, "multiplication");
+ int_overflow(mrb, "power");
}
}
return mrb_int_value(mrb, result);