Closed rsutphin closed 8 years ago
We'll resolve this problem for 1.3.0 release. Thanks for reporting the issue.
+1
Does anyone still need this? Ruby 1.8 (and 1.9 for that matter) are unsupported any longer. I'm not sure we have the people to maintain support for these versions. If you are still using 1.8 please leave a comment and I'll reopen.
dm-types/csv.rb
redefines the globalCSV
constant to be an alias toFasterCSV
when running under Ruby 1.8. While I understand the desire to keep the remainder of the code the same under 1.8 and 1.9, this causes a problem: if the built-in CSV library is required afterdm-types/csv.rb
(e.g., by another library) you get asuperclass mismatch for class Row
error.An alternative: define a method on that returns the appropriate module to use (CSV or FasterCSV) depending on the ruby version.
dm-serializer has a similar bug (datamapper/dm-serializer#25). The bug in dm-types is less serious since
dm-types/csv.rb
is only required if you actually use theCsv
type, but it is still a potential issue.