File tree Expand file tree Collapse file tree 2 files changed +27
-3
lines changed
Expand file tree Collapse file tree 2 files changed +27
-3
lines changed Original file line number Diff line number Diff line change @@ -3003,7 +3003,7 @@ end
30033003# table['Name'] # => ["Foo", "Bar", "Baz"]
30043004#
30053005class CSV::Table [out Elem] < Object
3006- include Enumerable [untyped ]
3006+ include Enumerable [Elem ]
30073007 extend Forwardable
30083008
30093009 # <!--
@@ -3634,8 +3634,8 @@ class CSV::Table[out Elem] < Object
36343634 # Returns a new Enumerator if no block is given:
36353635 # table.each # => #<Enumerator: #<CSV::Table mode:col row_count:4>:each>
36363636 #
3637- def each : () -> Enumerator[untyped , self ]
3638- | () { (untyped ) -> void } -> self
3637+ def each : () -> Enumerator[Elem , self ]
3638+ | () { (Elem ) -> void } -> self
36393639 | () { (*untyped ) -> void } -> self
36403640
36413641 def empty? : (*untyped args) { (*untyped ) -> untyped } -> untyped
Original file line number Diff line number Diff line change 1+ # frozen_string_literal: true
2+
3+ require_relative "test_helper"
4+ require "csv"
5+
6+ class CSV ::TableInstanceTest < Test ::Unit ::TestCase
7+ include TestHelper
8+
9+ library 'csv'
10+ testing "CSV::Table[CSV::Row]"
11+
12+ def test_each
13+ table = CSV ::Table . new ( [
14+ CSV ::Row . new ( [ ] , [ ] ) ,
15+ CSV ::Row . new ( [ ] , [ ] ) ,
16+ CSV ::Row . new ( [ ] , [ ] )
17+ ] )
18+
19+ assert_send_type "() -> Enumerator[CSV::Row, void]" ,
20+ table , :each
21+ assert_send_type "() { (CSV::Row) -> void } -> CSV::Table" ,
22+ table , :each do end
23+ end
24+ end
You can’t perform that action at this time.
0 commit comments