9582.patch

Thiago Lewin, 03/05/2014 05:16 AM

Download (870 Bytes)

View differences:

ChangeLog
1
Wed Mar  5 13:49:20 2014  Thiago Lewin  <thiago_lewin@yahoo.com.br>
2

  
3
	* lib/pathname.rb (CSV::Table#headers): search for the first 
4
	  row with header.
5
	  [ruby-core:61154]
6

  
1 7
Wed Mar  5 11:58:30 2014  Nobuyoshi Nakada  <nobu@ruby-lang.org>
2 8

  
3 9
	* ext/openssl/ossl.c (ossl_make_error): check NULL for unknown
lib/csv.rb
676 676
      if @table.empty?
677 677
        Array.new
678 678
      else
679
        @table.first.headers
679
        # search for the first row with headers
680
        @table.each do |row| 
681
          row_headers = row.headers
682
          return row_headers unless row_headers.empty?
683
        end
684
        Array.new
680 685
      end
681 686
    end
682 687