nobu
f9a5335ed4
csv.rb: honor encoding option
...
* lib/csv.rb (CSV#<<): honor explicity given encoding. based on
the patch by DAISUKE TANIWAKI <daisuketaniwaki AT gmail.com> at
[ruby-core:62113]. [Bug #9766 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-10 01:57:10 +00:00
nobu
2d89896461
* test/csv/test_data_converters.rb: use descriptive assertions.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-01 07:08:19 +00:00
nobu
d8441fcc6e
encdb.c, encoding.c: make BOM-encodings dummy
...
* enc/encdb.c (ENC_DUMMY_UNICODE): make BOM-encodings dummy.
* encoding.c (enc_autoload): keep dummy encodings dummy.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43034 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-24 08:15:18 +00:00
nobu
84a5622646
test_encodings.rb: remove BOM encodings
...
* test/csv/test_encodings.rb (TestCSV#each_encoding): encodings with
BOM are external use only.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-24 07:48:51 +00:00
nobu
d059d718b5
remove trainling spaces.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-21 04:50:18 +00:00
jeg2
6e7544f132
* lib/csv.rb: Improved stray quoting error message (patch by Edvard Majakari).
...
* lib/csv.rb: Remove debugging prints.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-25 14:46:08 +00:00
nobu
e858442f4f
* lib/csv.rb (CSV::open): suppress universal newline decorator.
...
fixes #4603
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-27 21:07:09 +00:00
nobu
0b98b9a95d
* strip trailing spaces.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-26 15:57:04 +00:00
nobu
6d8c13bc61
* test/with_different_ofs.rb (DifferentOFS): should not affect
...
original classes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-26 02:15:55 +00:00
nobu
ef99044673
* test/csv: DifferentOFS needs to be include in each classes.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-25 13:49:14 +00:00
nobu
c41b036f4d
test/with_different_ofs.rb: fixed typos.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30369 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-25 13:41:11 +00:00
nobu
08d99ac9e3
* lib/csv.rb (CSV.foreach): 'rb' mode is defaulted in open.
...
* lib/csv.rb (CSV#init_separators): cannonicalize encoding options
as Encoding objects.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30360 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-25 09:04:33 +00:00
nobu
9c017ca5fb
* lib/csv.rb (CSV#init_separators): use IO#gets with length
...
parameter to get rid of wrong convertion.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-25 08:32:27 +00:00
nobu
b4876f5e04
* lib/csv.rb (CSV::foreach, CSV#initialize): directly use encoding
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-25 07:04:38 +00:00
nobu
d05217109f
* lib/csv.rb, test/csv: should not assume $, invariant.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30353 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-25 06:58:58 +00:00
nobu
9b0f2e48d7
* test/csv/test_encodings.rb (TestEncodings#setup): fix evil test
...
suite writing to the source directory.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-25 06:04:07 +00:00
jeg2
b028e8d45d
* lib/csv.rb: Upgrading output encoding with ASCII content
...
as needed. [ruby-core:33229]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-17 15:03:25 +00:00
jeg2
40e5b39336
* lib/csv.rb: Upgrading output encoding as needed. [ruby-core:33135]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-16 23:55:29 +00:00
naruse
066b30245b
rescue Encoding::ConverterNotFoundError.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-16 06:31:31 +00:00
nobu
287a34ae0d
* {ext,lib,test}/**/*.rb: removed trailing spaces.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-06 03:56:38 +00:00
jeg2
b7be78d774
* test/csv/*: Renamed tc_* files to test_* to fit in within Ruby's
...
testing process.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-18 15:30:24 +00:00