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 @@ -3002,7 +3002,7 @@ end
30023002# table['Name'] # => ["Foo", "Bar", "Baz"]
30033003#
30043004class CSV::Table [out Elem] < Object
3005- include Enumerable [untyped ]
3005+ include Enumerable [Elem ]
30063006 extend Forwardable
30073007
30083008 # <!--
@@ -3633,8 +3633,8 @@ class CSV::Table[out Elem] < Object
36333633 # Returns a new Enumerator if no block is given:
36343634 # table.each # => #<Enumerator: #<CSV::Table mode:col row_count:4>:each>
36353635 #
3636- def each : () -> Enumerator[untyped , self ]
3637- | () { (untyped ) -> void } -> self
3636+ def each : () -> Enumerator[Elem , self ]
3637+ | () { (Elem ) -> void } -> self
36383638 | () { (*untyped ) -> void } -> self
36393639
36403640 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