diff options
Diffstat (limited to 'lib/csv.rb')
-rw-r--r-- | lib/csv.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/csv.rb b/lib/csv.rb index b6d9121146..15f06c96f8 100644 --- a/lib/csv.rb +++ b/lib/csv.rb @@ -1116,6 +1116,7 @@ class CSV # but transcode it to UTF-8 before CSV parses it. # def self.foreach(path, options = Hash.new, &block) + return to_enum(__method__, path, options) unless block open(path, options) do |csv| csv.each(&block) end |