summaryrefslogtreecommitdiff
path: root/numeric.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-06-04 07:34:19 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-06-04 07:34:19 +0000
commitb7bc0cae539617af4dfac5b44b0ebd700efe2084 (patch)
treea65171fc36999a1cc3c537a0b8bf62ddd9b16f77 /numeric.c
parent4cb164ee2a30ecb59ce93670e569f384c7da7521 (diff)
* string.c (rb_str_aset): should raise error if an indexing string
is not found in the receiver. * sprintf.c (rb_f_sprintf): "%d" should convert objects into integers using Integer(). * lib/tempfile.rb (Tempfile::size): added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/numeric.c b/numeric.c
index 2b9d6f5767..accd581133 100644
--- a/numeric.c
+++ b/numeric.c
@@ -640,7 +640,8 @@ flo_zero_p(num)
return Qfalse;
}
-static VALUE flo_is_nan_p(num)
+static VALUE
+flo_is_nan_p(num)
VALUE num;
{
@@ -649,19 +650,21 @@ static VALUE flo_is_nan_p(num)
return isnan(value) ? Qtrue : Qfalse;
}
-static VALUE flo_is_infinite_p(num)
+static VALUE
+flo_is_infinite_p(num)
VALUE num;
{
double value = RFLOAT(num)->value;
if (isinf(value)) {
- return INT2FIX( value < 0 ? -1 : +1 );
+ return INT2FIX( value < 0 ? -1 : 1 );
}
return Qnil;
}
-static VALUE flo_is_finite_p(num)
+static VALUE
+flo_is_finite_p(num)
VALUE num;
{
double value = RFLOAT(num)->value;