Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #10673 (closed defect: fixed)

Opened 8 months ago

Last modified 8 months ago

[PATCH] Ruby 1.9 CSV Compatibility

Reported by: JEG2 Assigned to: bitsweat
Priority: normal Milestone: 2.x
Component: ActiveRecord Version: edge
Severity: normal Keywords: patch csv ruby19 verified
Cc:

Description

In Ruby 1.9 the standard CSV library was replaced with the FasterCSV code base. This single line change modifies the ActiveRecord fixture loading code to use a CSV reading method available in both the old and new versions of the library. This makes the code run unchanged on Ruby 1.8 or Ruby 1.9.

Attachments

ruby19_csv_compatibility.patch (509 bytes) - added by JEG2 on 01/02/08 15:23:47.
The change described in the ticket.

Change History

01/02/08 15:23:47 changed by JEG2

  • attachment ruby19_csv_compatibility.patch added.

The change described in the ticket.

01/02/08 15:32:27 changed by chuyeow

  • owner changed from core to bitsweat.

+1

01/03/08 00:55:08 changed by lotswholetime

  • component changed from ActionPack to ActiveRecord.

+1

01/03/08 17:20:43 changed by murphy

  • keywords changed from patch csv ruby19 to patch csv ruby19 verified.

+1; tests run through. thank you, JEG.

01/03/08 17:24:00 changed by murphy

Note: We may have a conflict with #2117.

01/03/08 17:33:40 changed by JEG2

The new CSV library in Ruby 1.9 automatically searches for the correct line ending by default as the code in #2117 does. So this is less of an issue going forward. If we want to apply both patches, we can check for which CSV library is present and branch to the code in this patch or #2117 as needed. I can modify the #2117 patch to do this if desired. Just let me know if we want me to do this and let me know where to send and updated patch (here or in #2117). Thanks.

01/03/08 19:32:38 changed by nzkoz

  • status changed from new to closed.
  • resolution set to fixed.

(In [8545]) Merge CSV compat changes to stable, closes #10673