summaryrefslogtreecommitdiff
path: root/time.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-05-14 12:26:22 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-05-14 12:26:22 +0000
commit0cf6e773be4ab563decd19c6a285568e489e80ea (patch)
tree4fee6360c84046e54c1e72171701df114372750e /time.c
parent7268344d38a948ee9bc25c85aeb4a1b60969a29a (diff)
* eval.c (eval): warning during eval should not cause deadlock.
[ruby-talk:98651] * eval.c (rb_eval): raise TypeError exception for superclass mismatch. [ruby-dev:39567] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6310 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'time.c')
-rw-r--r--time.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/time.c b/time.c
index b177c5f..69f3127 100644
--- a/time.c
+++ b/time.c
@@ -1895,11 +1895,11 @@ time_mdump(time)
t = tobj->tv.tv_sec;
tm = gmtime(&t);
- if ((tm->tm_year & 0x1ffff) != tm->tm_year)
+ if ((tm->tm_year & 0xffff) != tm->tm_year)
rb_raise(rb_eArgError, "year too big to marshal");
p = 0x1 << 31 | /* 1 */
- tm->tm_year << 14 | /* 17 */
+ tm->tm_year << 14 | /* 16 */
tm->tm_mon << 10 | /* 4 */
tm->tm_mday << 5 | /* 5 */
tm->tm_hour; /* 5 */
@@ -1980,7 +1980,7 @@ time_mload(time, str)
}
else {
p &= ~(1<<31);
- tm.tm_year = (p >> 14) & 0x1ffff;
+ tm.tm_year = (p >> 14) & 0xffff;
tm.tm_mon = (p >> 10) & 0xf;
tm.tm_mday = (p >> 5) & 0x1f;
tm.tm_hour = p & 0x1f;