Show
Ignore:
Timestamp:
10/19/06 09:00:01 (4 years ago)
Author:
olivier
Message:

Load ./for-1.1/ into trunk.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/globalize/models/currency.rb

    r1 r21  
    150150        raise ArgumentError, "Not an amount (#{num})" if num.delete("^0-9").empty? 
    151151        _dollars, _cents = num.delete("^0-9.").split('.', 2) 
    152         _cents = 0 if !_cents 
     152        _cents = _cents ? _cents[0,2] : 0 
    153153        Currency.new(_dollars.to_i * 100 + _cents.to_i) 
    154154      when num.is_a?(Numeric)