summaryrefslogtreecommitdiff
path: root/math.c
diff options
context:
space:
mode:
authortadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-21 12:53:40 +0000
committertadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-21 12:53:40 +0000
commitbdf81563bf8bf7922cd8366c792478e220f76168 (patch)
tree563ab1de3ff5ee7c3b298d472fff80b7e7484423 /math.c
parent83b381752e21f15eb224bcf53142a3c8eaede1dc (diff)
* math.c (math_log): should check argc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 ac0d4c1..340014b 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));
}