summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-10-05 05:42:04 +0000
committernahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-10-05 05:42:04 +0000
commitd323eb257988e27878a674b87db3a1e71687a8dd (patch)
tree1c0c636a4dbe03eeab831aa73fff92ca39ff4939
parenta415b799f52f07d318abc0489fad28e304620a90 (diff)
downloadruby-d323eb257988e27878a674b87db3a1e71687a8dd.tar.gz
ruby-d323eb257988e27878a674b87db3a1e71687a8dd.tar.xz
ruby-d323eb257988e27878a674b87db3a1e71687a8dd.zip
* lib/xsd/datatypes.rb: Rational -> Decimal string bug fix.
* test/soap/marshal/test_marshal.rb: ditto. * test/soap/calc/test_calc_cgi.rb: add Config::CONFIG["EXEECT"] to RUBYBIN. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog9
-rw-r--r--lib/xsd/datatypes.rb2
-rw-r--r--test/soap/calc/test_calc_cgi.rb6
-rw-r--r--test/soap/marshal/test_marshal.rb5
4 files changed, 19 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 49f5fc95c..003f8a3a0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+Sun Oct 5 14:37:39 2003 NAKAMURA, Hiroshi <nahi@ruby-lang.org>
+
+ * lib/xsd/datatypes.rb: Rational -> Decimal string bug fix.
+
+ * test/soap/marshal/test_marshal.rb: ditto.
+
+ * test/soap/calc/test_calc_cgi.rb: add Config::CONFIG["EXEECT"] to
+ RUBYBIN.
+
Sun Oct 5 13:47:22 2003 NAKAMURA, Hiroshi <nahi@ruby-lang.org>
* test/ruby/test_beginendblock.rb, test/ruby/beginmainend.rb: add tests
diff --git a/lib/xsd/datatypes.rb b/lib/xsd/datatypes.rb
index 0be64fe63..a1e3e5562 100644
--- a/lib/xsd/datatypes.rb
+++ b/lib/xsd/datatypes.rb
@@ -600,7 +600,7 @@ private
year, @data.mon, @data.mday, @data.hour, @data.min, @data.sec)
if @data.sec_fraction.nonzero?
fr = @data.sec_fraction * SecInDay
- shiftsize = fr.denominator.to_s.size
+ shiftsize = fr.denominator.to_s.size + 1
fr_s = (fr * (10 ** shiftsize)).to_i.to_s
s << '.' << '0' * (shiftsize - fr_s.size) << fr_s.sub(/0+$/, '')
end
diff --git a/test/soap/calc/test_calc_cgi.rb b/test/soap/calc/test_calc_cgi.rb
index 14b0097bb..6e7bae8d2 100644
--- a/test/soap/calc/test_calc_cgi.rb
+++ b/test/soap/calc/test_calc_cgi.rb
@@ -11,7 +11,11 @@ module Calc
class TestCalcCGI < Test::Unit::TestCase
# This test shuld be run after installing ruby.
- RUBYBIN = File.join(Config::CONFIG["bindir"], Config::CONFIG["ruby_install_name"])
+ RUBYBIN = File.join(
+ Config::CONFIG["bindir"],
+ Config::CONFIG["ruby_install_name"] + Config::CONFIG["EXEEXT"]
+ )
+
def setup
logger = Logger.new(STDERR)
logger.level = Logger::Severity::FATAL
diff --git a/test/soap/marshal/test_marshal.rb b/test/soap/marshal/test_marshal.rb
index 87e364e2a..21776c5fd 100644
--- a/test/soap/marshal/test_marshal.rb
+++ b/test/soap/marshal/test_marshal.rb
@@ -199,7 +199,10 @@ module MarshalTestLib
class MyTime < Time; def initialize(v, *args) super(*args); @v = v; end end
def test_time
- marshal_equal(Time.now)
+ # once there was a bug caused by usec overflow. try a little harder.
+ 10.times do
+ marshal_equal(Time.now)
+ end
end
def test_time_subclass