# File lib/csv.rb, line 214 def CSV.parse_row(src, idx, out_dev, fs = nil, rs = nil) fs ||= ',' if fs.is_a?(Fixnum) fs = fs.chr end if !rs.nil? and rs.is_a?(Fixnum) rs = rs.chr end idx_backup = idx parsed_cells = 0 res_type = :DT_COLSEP begin while res_type != :DT_ROWSEP res_type, idx, cell = parse_body(src, idx, fs, rs) if res_type == :DT_EOS if idx == idx_backup #((parsed_cells == 0) and cell.nil?) return 0, 0 end res_type = :DT_ROWSEP end parsed_cells += 1 out_dev << cell end rescue IllegalFormatError return 0, 0 end return parsed_cells, idx end