ruby-units 1.1.2 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG.txt +1 -0
- data/lib/ruby_units/ruby-units.rb +1 -1
- data/lib/ruby_units/string.rb +4 -4
- data/test/test_ruby-units.rb +1 -0
- metadata +1 -1
    
        data/CHANGELOG.txt
    CHANGED
    
    
    
        data/lib/ruby_units/string.rb
    CHANGED
    
    | @@ -9,10 +9,10 @@ class String | |
| 9 9 |  | 
| 10 10 | 
             
              # format unit output using formating codes '%0.2f' % '1 mm'.unit => '1.00 mm'
         | 
| 11 11 | 
             
              def %(*args)
         | 
| 12 | 
            -
                case  | 
| 13 | 
            -
                when Unit: args[0].to_s(self)
         | 
| 14 | 
            -
                when ( | 
| 15 | 
            -
                when Complex: args[0].to_s
         | 
| 12 | 
            +
                case 
         | 
| 13 | 
            +
                when Unit === args[0]: args[0].to_s(self)
         | 
| 14 | 
            +
                when (!defined?(Uncertain).nil? && (Uncertain === args[0])): args[0].to_s(self)
         | 
| 15 | 
            +
                when Complex === args[0]: args[0].to_s
         | 
| 16 16 | 
             
                else
         | 
| 17 17 | 
             
                  unit_format(*args)
         | 
| 18 18 | 
             
                end
         | 
    
        data/test/test_ruby-units.rb
    CHANGED
    
    
    
        metadata
    CHANGED