aboutsummaryrefslogtreecommitdiffstats
path: root/math.c
diff options
context:
space:
mode:
Diffstat (limited to 'math.c')
-rw-r--r--math.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/math.c b/math.c
index ac0d4c1fe7..340014b624 100644
--- a/math.c
+++ b/math.c
@@ -353,7 +353,7 @@ math_log(int argc, VALUE *argv)
Need_Float(x);
errno = 0;
d = log(RFLOAT_VALUE(x));
- if (!NIL_P(base)) {
+ if (argc == 2) {
Need_Float(base);
d /= log(RFLOAT_VALUE(base));
}