diff --git a/Gemfile b/Gemfile index 3ceb2ad8f..18d07a259 100644 --- a/Gemfile +++ b/Gemfile @@ -30,6 +30,7 @@ gem "rbs-amber", path: "test/assets/test-gem" # Bundled gems gem "net-smtp" +gem 'csv' group :minitest do gem "minitest" diff --git a/Gemfile.lock b/Gemfile.lock index 9205d0758..9e4f346d3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -18,6 +18,7 @@ GEM ast (2.4.2) base64 (0.2.0) bigdecimal (3.1.6) + csv (3.2.8) dbm (1.1.0) diff-lcs (1.5.0) digest (3.1.1) @@ -102,6 +103,7 @@ DEPENDENCIES abbrev base64 bigdecimal + csv dbm digest fileutils diff --git a/stdlib/csv/0/csv.rbs b/stdlib/csv/0/csv.rbs index 48028eecb..32b60f7b6 100644 --- a/stdlib/csv/0/csv.rbs +++ b/stdlib/csv/0/csv.rbs @@ -1722,7 +1722,10 @@ class CSV < Object # would read `UTF-32BE` data from the file but transcode it to `UTF-8` # before parsing. # - def self.foreach: [U] (String | IO | StringIO path, ?::Hash[Symbol, U] options) { (::Array[String?] arg0) -> void } -> void + def self.foreach: (String | IO path, ?String mode, headers: true, **untyped options) { (::CSV::Row arg0) -> void } -> void + | (String | IO path, ?String mode, headers: true, **untyped options) -> Enumerator[::CSV::Row, void] + | (String | IO path, ?String mode, **untyped options) { (::Array[String?] arg0) -> void } -> void + | (String | IO path, ?String mode, **untyped options) -> Enumerator[::Array[String?], void] #