mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/csv.rb (CSV.read): no mode is needed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31369 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c612fc92ec
commit
2f348762fb
2 changed files with 6 additions and 5 deletions
|
@ -1,3 +1,7 @@
|
|||
Thu Apr 28 06:07:02 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* lib/csv.rb (CSV.read): no mode is needed.
|
||||
|
||||
Thu Apr 28 06:06:56 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* io.c (rb_io_extract_modeenc, rb_f_backquote): set default text
|
||||
|
|
|
@ -1398,11 +1398,8 @@ class CSV
|
|||
# <tt>encoding: "UTF-32BE:UTF-8"</tt> would read UTF-32BE data from the file
|
||||
# but transcode it to UTF-8 before CSV parses it.
|
||||
#
|
||||
def self.read(path, options = Hash.new)
|
||||
encoding = options.delete(:encoding)
|
||||
mode = "rb"
|
||||
mode << ":#{encoding}" if encoding
|
||||
open(path, mode, options) { |csv| csv.read }
|
||||
def self.read(path, *options)
|
||||
open(path, *options) { |csv| csv.read }
|
||||
end
|
||||
|
||||
# Alias for CSV::read().
|
||||
|
|
Loading…
Reference in a new issue