Welcome to the "trac"-ing site of soap4r!
[soap4r] [httpclient] [openpgp4u] [pkcs1] [logger] [csv] [vtr]

Changeset 1001

Show
Ignore:
Timestamp:
10/05/03 12:57:19 (5 years ago)
Author:
nahi
Message:

* Rational -> Decimal string bug fix.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/xsd/datatypes.rb

    r995 r1001  
    601601    if @data.sec_fraction.nonzero? 
    602602      fr = @data.sec_fraction * SecInDay 
    603       shiftsize = fr.denominator.to_s.size 
     603      shiftsize = fr.denominator.to_s.size + 1 
    604604      fr_s = (fr * (10 ** shiftsize)).to_i.to_s 
    605605      s << '.' << '0' * (shiftsize - fr_s.size) << fr_s.sub(/0+$/, '') 
  • trunk/test/soap/marshal/test_marshal.rb

    r983 r1001  
    200200  class MyTime < Time; def initialize(v, *args) super(*args); @v = v; end end 
    201201  def test_time 
    202     marshal_equal(Time.now) 
     202    # once there was a bug caused by usec overflow.  try a little harder. 
     203    10.times do 
     204      marshal_equal(Time.now) 
     205    end 
    203206  end 
    204207