Blob Blame Raw
From 936bb463e1e47f5bee767027a25bf211876d8be9 Mon Sep 17 00:00:00 2001
From: Kouhei Sutou <kou@clear-code.com>
Date: Thu, 28 Feb 2013 00:15:51 +0900
Subject: [PATCH] Use CSV::VERSION to detect newer CSV library

CSV.dump (and CSV.load) had been removed since Ruby 2.0.0.

GitHub: fix #54

Reported by mtasaka. Thanks!!!
---
 lib/test/unit/data.rb |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/test/unit/data.rb b/lib/test/unit/data.rb
index 3fec326..9f71f01 100644
--- a/lib/test/unit/data.rb
+++ b/lib/test/unit/data.rb
@@ -194,7 +194,7 @@ def load_csv(file_name)
           # @api private
           def load_tsv(file_name)
             require "csv"
-            if CSV.respond_to?(:dump)
+            if CSV.const_defined?(:VERSION)
               first_row = true
               header = nil
               CSV.foreach(file_name, :col_sep => "\t") do |row|
-- 
1.7.10