summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/csv.rb7
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().