Fix TypeError: can't dup NilClass from EntrySet#dup
This commit is contained in:
parent
9dd0912fcb
commit
73bfa5955c
|
@ -18,7 +18,7 @@ module Zip
|
||||||
end
|
end
|
||||||
|
|
||||||
def <<(entry)
|
def <<(entry)
|
||||||
@entry_set[to_key(entry)] = entry
|
@entry_set[to_key(entry)] = entry if entry
|
||||||
end
|
end
|
||||||
|
|
||||||
alias push <<
|
alias push <<
|
||||||
|
|
Binary file not shown.
|
@ -546,6 +546,10 @@ class ZipFileTest < MiniTest::Test
|
||||||
assert_equal 13, entry_count
|
assert_equal 13, entry_count
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_open_xls_does_not_raise_type_error
|
||||||
|
::Zip::File.open('test/data/test.xls')
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def assert_contains(zf, entryName, filename = entryName)
|
def assert_contains(zf, entryName, filename = entryName)
|
||||||
|
|
Loading…
Reference in New Issue