Skip to content

Commit

Permalink
Merge pull request #442 from amatsuda/warnings
Browse files Browse the repository at this point in the history
Fixes Ruby Warnings
  • Loading branch information
chopraanmol1 authored Sep 11, 2018
2 parents c5e778f + c5ac494 commit 538d09a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/roo/excelx.rb
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ def process_zipfile_entries(entries)
when /drawing([0-9]+).xml.rels$/
# Extracting drawing relationships to make images lists for each sheet
nr = Regexp.last_match[1].to_i
image_rels[nr -1] = "#{@tmpdir}/roo_image_rels#{nr}"
image_rels[nr - 1] = "#{@tmpdir}/roo_image_rels#{nr}"
end

entry.extract(path) if path
Expand Down
1 change: 0 additions & 1 deletion lib/roo/excelx/shared_strings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ def extract_html_r(r_elem)
i: false,
u: false
}
b, i, u, sub, sup = false, false, false, false, false
r_elem.children.each do |elem|
case elem.name
when 'rPr'
Expand Down
2 changes: 1 addition & 1 deletion lib/roo/spreadsheet.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def extension_for(path, options)
options[:file_warning] = :ignore
extension.tr('.', '').downcase.to_sym
else
res = ::File.extname((path =~ /\A#{::URI.regexp}\z/) ? ::URI.parse(::URI.encode(path)).path : path)
res = ::File.extname((path =~ /\A#{::URI::DEFAULT_PARSER.make_regexp}\z/) ? ::URI.parse(::URI.encode(path)).path : path)
res.tr('.', '').downcase.to_sym
end
end
Expand Down

0 comments on commit 538d09a

Please sign in to comment.