mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/csv.rb (CSV#raw_encoding): returns ASCII-8BIT when the io
doesn't have encoding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e0eb17f887
commit
ee2512496c
2 changed files with 8 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
Fri Oct 16 12:03:31 2009 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* lib/csv.rb (CSV#raw_encoding): returns ASCII-8BIT when the io
|
||||
doesn't have encoding.
|
||||
|
||||
Fri Oct 16 03:15:52 2009 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* lib/csv.rb (CSV#read_to_char): set encoding and verify data
|
||||
|
|
|
@ -2288,8 +2288,10 @@ class CSV
|
|||
@io.internal_encoding || @io.external_encoding
|
||||
elsif @io.is_a? StringIO
|
||||
@io.string.encoding
|
||||
else
|
||||
elsif @io.respond_to? :encoding
|
||||
@io.encoding
|
||||
else
|
||||
Encoding::ASCII_8BIT
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue