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
|
||||
|
||||
def <<(entry)
|
||||
@entry_set[to_key(entry)] = entry
|
||||
@entry_set[to_key(entry)] = entry if entry
|
||||
end
|
||||
|
||||
alias push <<
|
||||
|
|
Binary file not shown.
|
@ -546,6 +546,10 @@ class ZipFileTest < MiniTest::Test
|
|||
assert_equal 13, entry_count
|
||||
end
|
||||
|
||||
def test_open_xls_does_not_raise_type_error
|
||||
::Zip::File.open('test/data/test.xls')
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def assert_contains(zf, entryName, filename = entryName)
|
||||
|
|
Loading…
Reference in New Issue