1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* math.c (math_log): should check argc.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
tadf 2008-09-21 12:53:40 +00:00
parent 83b381752e
commit bdf81563bf
3 changed files with 6 additions and 1 deletions

View file

@ -113,6 +113,7 @@ class TestMath < Test::Unit::TestCase
assert_equal(1.0/0, Math.log(1.0/0))
assert_raise(Errno::EDOM, Errno::ERANGE) { Math.log(0) }
assert_raise(Errno::EDOM, Errno::ERANGE) { Math.log(-1) }
assert_raise(TypeError) { Math.log(1,nil) }
end
def test_log2