diff options
author | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-21 12:53:40 +0000 |
---|---|---|
committer | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-21 12:53:40 +0000 |
commit | bdf81563bf8bf7922cd8366c792478e220f76168 (patch) | |
tree | 563ab1de3ff5ee7c3b298d472fff80b7e7484423 /math.c | |
parent | 83b381752e21f15eb224bcf53142a3c8eaede1dc (diff) | |
download | ruby-bdf81563bf8bf7922cd8366c792478e220f76168.tar.gz |
* 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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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)); } |