Changeset 1285

Show
Ignore:
Timestamp:
03/06/08 15:57:58 (9 months ago)
Author:
sandal
Message:

further refinement of csv shim

Files:

Legend:

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

    r1238 r1285  
    1010# See LICENSE and COPYING for details 
    1111# 
     12  
     13 
     14if RUBY_VERSION > "1.9"      
     15  require "csv"    
     16  unless defined? FCSV 
     17    class Object    
     18      FCSV = CSV   
     19      alias_method :FCSV, :CSV  
     20    end    
     21  end 
     22end 
     23 
    1224 
    1325module Ruport #:nodoc:# 
    1426   
    15   VERSION = "1.5.0"    
    16    
     27  VERSION = "1.5.0"      
     28  
    1729  class FormatterError < RuntimeError #:nodoc: 
    1830  end 
  • ruport/trunk/lib/ruport/formatter/csv.rb

    r1284 r1285  
    3131  # 
    3232  class Formatter::CSV < Formatter 
    33                         
    34     if RUBY_VERSION > "1.9"      
    35       require "csv" 
    36       unless defined? FCSV  
    37         FCSV = CSV   
    38         alias_method :FCSV, :CSV     
    39       end 
    40     end 
    4133     
    4234    renders :csv, :for => [ Renderer::Row,   Renderer::Table,