diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-04-27 21:07:04 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-04-27 21:07:04 +0000 |
commit | 2f348762fbcf97b1de3b91c0dd84ba8b8b430dfd (patch) | |
tree | ba0c6f1febd2e0e32ef7233273b6a2f7914a6552 /lib/csv.rb | |
parent | c612fc92ec46809655caed77df894ce9b4724f50 (diff) |
* 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
Diffstat (limited to 'lib/csv.rb')
-rw-r--r-- | lib/csv.rb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/csv.rb b/lib/csv.rb index 1aad2f3085..085ee8433d 100644 --- a/lib/csv.rb +++ b/lib/csv.rb @@ -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(). |