From ea69fbbc9103e2a864584d8593034c72feeb8f0d Mon Sep 17 00:00:00 2001 From: matz Date: Fri, 3 Sep 2004 17:41:27 +0000 Subject: * eval.c (cvar_cbase): class variables cause SEGV in instance_eval() for fixnums and symbols. [ruby-dev:24213] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@6855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- math.c | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'math.c') diff --git a/math.c b/math.c index cea7bb801..5b9294e78 100644 --- a/math.c +++ b/math.c @@ -331,28 +331,6 @@ math_log(obj, x) return rb_float_new(d); } -/* - * call-seq: - * Math.log2(numeric) => float - * - * Returns the base 2 logarithm of numeric. - */ - -static VALUE -math_log2(obj, x) - VALUE obj, x; -{ - double d; - - Need_Float(x); - errno = 0; - d = log2(RFLOAT(x)->value); - if (errno) { - rb_sys_fail("log2"); - } - return rb_float_new(d); -} - /* * call-seq: * Math.log10(numeric) => float @@ -533,7 +511,6 @@ Init_Math() rb_define_module_function(rb_mMath, "exp", math_exp, 1); rb_define_module_function(rb_mMath, "log", math_log, 1); - rb_define_module_function(rb_mMath, "log2", math_log, 1); rb_define_module_function(rb_mMath, "log10", math_log10, 1); rb_define_module_function(rb_mMath, "sqrt", math_sqrt, 1); -- cgit