summaryrefslogtreecommitdiff
path: root/bignum.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-07-11 08:24:54 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-07-11 08:24:54 +0000
commitfefba453856ff9dfe5ecb0b1e04888c6f14b2383 (patch)
treee4ac3ce8b1d657c893ce2e79d40ca183e625c846 /bignum.c
parent8e1d1358b689a13b4706754a2ab3fbcd7ef1d683 (diff)
* string.c (rb_str_slice_bang): if there's no corresponding
substring, slice! should return nil without exception. * string.c (rb_str_split_m): accept separator value nil as well. * class.c (include_class_new): module may be T_ICLASS; retrieve original module information. * re.c (rb_reg_expr_str): need to process backslashes properly. * parse.y (yylex): no here document after a dot. * parse.y (yylex): should have set lex_state properly after '`'. * parse.y (yylex): should have set lex_state properly after tOP_ASGN. * bignum.c (rb_big2dbl): return canonical HUGE_VAL for infinity. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@2633 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bignum.c')
-rw-r--r--bignum.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/bignum.c b/bignum.c
index 3c768fabf7..17e17b6647 100644
--- a/bignum.c
+++ b/bignum.c
@@ -537,6 +537,7 @@ rb_big2dbl(x)
while (i--) {
d = ds[i] + BIGRAD*d;
}
+ if (isinf(d)) d = HUGE_VAL;
if (!RBIGNUM(x)->sign) d = -d;
return d;
}