summaryrefslogtreecommitdiff
path: root/test/csv
diff options
context:
space:
mode:
authorjeg2 <jeg2@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-01-31 05:34:17 +0000
committerjeg2 <jeg2@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-01-31 05:34:17 +0000
commitae0b6068308814274903466ef0788161798b3265 (patch)
tree96cdf8ceb178667cfd8e3a006a523e5fcdf58fa1 /test/csv
parentbcbfa7a97bdf46b534666f6195f8c9a441a044a4 (diff)
* A bug fix for deleting blank Table rows from Andy Hartford.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/csv')
-rw-r--r--test/csv/test_table.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/csv/test_table.rb b/test/csv/test_table.rb
index e87f1b2..b7c72b8 100644
--- a/test/csv/test_table.rb
+++ b/test/csv/test_table.rb
@@ -321,6 +321,12 @@ class TestCSVTable < Test::Unit::TestCase
END_RESULT
end
+ def test_delete_with_blank_rows
+ data = "col1,col2\nra1,ra2\n\nrb1,rb2"
+ table = CSV.parse(data, :headers => true)
+ assert_equal(["ra2", nil, "rb2"], table.delete("col2"))
+ end
+
def test_delete_if
######################
### Mixed/Row Mode ###