From eaa572e57d1a21892e57f7e451cb991fab32b2d2 Mon Sep 17 00:00:00 2001 From: naruse Date: Wed, 29 Jun 2011 21:25:03 +0000 Subject: * lib/cmath.rb (CMath.log): second argument: b can be nil. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32307 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/cmath.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/cmath.rb') diff --git a/lib/cmath.rb b/lib/cmath.rb index 74ef41de72..eef1134ef3 100644 --- a/lib/cmath.rb +++ b/lib/cmath.rb @@ -71,7 +71,7 @@ module CMath def log(*args) begin z, b = args - unless b.kind_of?(Numeric) + unless b.nil? || b.kind_of?(Numeric) raise TypeError, "Numeric Number required" end if z.real? and z >= 0 and (b.nil? or b >= 0) -- cgit v1.2.3