Permalink
Browse files

Fix spec failures on 32bit Linux

  • Loading branch information...
1 parent 9b20270 commit 71a7d95c56be1f195963edee5a6f74e36701646b Evan Phoenix committed Feb 12, 2010
Showing with 5 additions and 2 deletions.
  1. +2 −2 kernel/bootstrap/time.rb
  2. +3 −0 vm/builtin/time.cpp
View
@@ -6,12 +6,12 @@ def self.now
def self.specific(sec, usec, from_gmt)
Ruby.primitive :time_s_specific
- raise PrimitiveFailure, "Time.specific primitive failed"
+ raise ArgumentError, "descriptors reference invalid time"
end
def self.from_array(sec, min, hour, mday, month, year, usec, is_dst, from_gmt)
Ruby.primitive :time_s_from_array
- raise PrimitiveFailure, "Time.from_array primitive failed"
+ raise ArgumentError, "descriptors reference invalid time"
end
def dup
View
@@ -112,6 +112,7 @@ namespace rubinius {
if(RTEST(from_gmt)) {
seconds = ::timegm(&tm);
} else {
+ tzset();
seconds = ::mktime(&tm);
}
@@ -149,6 +150,7 @@ namespace rubinius {
if(RTEST(use_gmt)) {
gmtime_r(&seconds, &tm);
} else {
+ tzset();
localtime_r(&seconds, &tm);
}
@@ -188,6 +190,7 @@ namespace rubinius {
is_gmt = 1;
gmtime_r(&seconds, &tm);
} else {
+ tzset();
localtime_r(&seconds, &tm);
}

0 comments on commit 71a7d95

Please sign in to comment.