summaryrefslogtreecommitdiff
path: root/time.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-12-22 02:51:00 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-12-22 02:51:00 +0000
commit0a45dee5a529461b0e6eb69f14ef4e32eb2ccc9b (patch)
tree79bd6f4a118a0642a620ce88c1601e92725c32f1 /time.c
parent63b6b9c43003cd5071748efca0a6d9b066834c5b (diff)
* parse.y (str_extend): make up "#$;" handling.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'time.c')
-rw-r--r--time.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/time.c b/time.c
index 36db68f..9323dca 100644
--- a/time.c
+++ b/time.c
@@ -952,6 +952,7 @@ time_plus(time1, time2)
}
v = NUM2DBL(time2);
d = modf(v, &f);
+ sec = (time_t)f;
if (f != (double)sec || d >= 1.0 || d <= -1.0) {
rb_raise(rb_eRangeError, "time + %f out of Time range", v);
}
@@ -998,6 +999,7 @@ time_minus(time1, time2)
}
v = NUM2DBL(time2);
d = modf(v, &f);
+ sec = (time_t)f;
if (f != (double)sec || d >= 1.0 || d <= -1.0) {
rb_raise(rb_eRangeError, "time - %f out of Time range", v);
}