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 | ae61af9b019bfbb68dbc8e01b8c2b16c177292b2 (patch) | |
| tree | 563ab1de3ff5ee7c3b298d472fff80b7e7484423 /math.c | |
| parent | c2e74757693097692fee3127a3f6fb48cca5543b (diff) | |
| download | ruby-ae61af9b019bfbb68dbc8e01b8c2b16c177292b2.tar.gz ruby-ae61af9b019bfbb68dbc8e01b8c2b16c177292b2.tar.xz ruby-ae61af9b019bfbb68dbc8e01b8c2b16c177292b2.zip | |
* math.c (math_log): should check argc.
git-svn-id: http://svn.ruby-lang.org/repos/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)); } |
