summaryrefslogtreecommitdiffstats
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
commit92685273663c82ffdab2e1b6992b965bdbc4b52b (patch)
tree79bd6f4a118a0642a620ce88c1601e92725c32f1 /time.c
parent724b4e38b39a53602aea57b6bf63033f5bdd7278 (diff)
downloadruby-92685273663c82ffdab2e1b6992b965bdbc4b52b.tar.gz
ruby-92685273663c82ffdab2e1b6992b965bdbc4b52b.tar.xz
ruby-92685273663c82ffdab2e1b6992b965bdbc4b52b.zip
* parse.y (str_extend): make up "#$;" handling.
git-svn-id: http://svn.ruby-lang.org/repos/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 36db68fa8..9323dca82 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);
}