summaryrefslogtreecommitdiff
path: root/test/csv
diff options
context:
space:
mode:
authorjeg2 <jeg2@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-04-01 14:40:48 +0000
committerjeg2 <jeg2@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-04-01 14:40:48 +0000
commit1170b057e02cefd34b4ff88ee01369c91b16ae2d (patch)
treea5bb2431924b0cb12dbbc06c974a451b01fc9c70 /test/csv
parent7c4d4e1eb2897cec295ea9316835fc3cfef96d6d (diff)
* lib/csv.rb: Symbol HeaderConverter: strip leading/trailing space.
Reported by Skye Shaw [Fixes GH-575] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/csv')
-rwxr-xr-xtest/csv/test_headers.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/csv/test_headers.rb b/test/csv/test_headers.rb
index 94d5e9f..79ccd20 100755
--- a/test/csv/test_headers.rb
+++ b/test/csv/test_headers.rb
@@ -217,9 +217,10 @@ class TestCSV::Headers < TestCSV
end
def test_builtin_symbol_converter
- csv = CSV.parse( "One,TWO Three", headers: true,
- return_headers: true,
- header_converters: :symbol )
+ # Note that the trailing space is intentional
+ csv = CSV.parse( "One,TWO Three ", headers: true,
+ return_headers: true,
+ header_converters: :symbol )
assert_equal([:one, :two_three], csv.headers)
end