summaryrefslogtreecommitdiffstats
path: root/test/yaml
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-04-21 14:56:59 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-04-21 14:56:59 +0000
commit7e127d0212acd13749f146c798bc708b165d8665 (patch)
tree7861dbce5046671694894b080ca6d0e0d15c6175 /test/yaml
parent7f115860db65b3f0a7f6a35c8bae53193f4de939 (diff)
downloadruby-7e127d0212acd13749f146c798bc708b165d8665.tar.gz
ruby-7e127d0212acd13749f146c798bc708b165d8665.tar.xz
ruby-7e127d0212acd13749f146c798bc708b165d8665.zip
* time.c: remove time_t restriction from Time class.
* timev.h: new file to define struct vtm. * strftime.c: format struct vtm instead of struct tm. * ext/syck/rubyext.c (mktime_do): don't use time_t; [ruby-dev:38191] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/yaml')
-rw-r--r--test/yaml/test_yaml.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/yaml/test_yaml.rb b/test/yaml/test_yaml.rb
index 4f612ebae..8c7aef3dc 100644
--- a/test/yaml/test_yaml.rb
+++ b/test/yaml/test_yaml.rb
@@ -48,7 +48,7 @@ class YAML_Unit_Tests < Test::Unit::TestCase
# Make a time with the time zone
#
def mktime( year, mon, day, hour, min, sec, usec, zone = "Z" )
- usec = usec.to_s.to_f * 1000000
+ usec = Rational(usec.to_s) * 1000000
val = Time::utc( year.to_i, mon.to_i, day.to_i, hour.to_i, min.to_i, sec.to_i, usec )
if zone != "Z"
hour = zone[0,3].to_i * 3600