summaryrefslogtreecommitdiff
path: root/lib/csv.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/csv.rb')
-rw-r--r--lib/csv.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/csv.rb b/lib/csv.rb
index 91aeb19a3c..87c3a4be31 100644
--- a/lib/csv.rb
+++ b/lib/csv.rb
@@ -2650,8 +2650,13 @@ end
# c.read.any? { |a| a.include?("zombies") }
# } #=> false
#
-def CSV(*args, &block)
- CSV.instance(*args, &block)
+# CSV options may also be given.
+#
+# io = StringIO.new
+# CSV(io, col_sep: ";") { |csv| csv << ["a", "b", "c"] }
+#
+def CSV(*args, **options, &block)
+ CSV.instance(*args, **options, &block)
end
require_relative "csv/version"