lib/zip-container/entries/managed.rb in zip-container-0.9.0 vs lib/zip-container/entries/managed.rb in zip-container-1.0.0

- old
+ new

@@ -28,12 +28,11 @@ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. # # Author: Robert Haines -require 'zip/zip_entry' - +# module ZipContainer # This module provides support for managed file and directory entries. # # <b>Note!</b> If you mix this module in you *must* call @@ -84,10 +83,10 @@ # :call-seq: # managed_entry?(entry) -> boolean # # Is the supplied entry/name a managed entry? def managed_entry?(entry, list = managed_entry_names) - name = entry.kind_of?(::Zip::ZipEntry) ? entry.name : entry + name = entry.kind_of?(::Zip::Entry) ? entry.name : entry name.chop! if name.end_with? "/" list.map { |n| n.downcase }.include? name.downcase end # :call-seq: