Skip to content

Commit

Permalink
Remove dead code in extra_field/generic.rb (==).
Browse files Browse the repository at this point in the history
From what I can tell this was erroneously copied out of extra_field.rb
during a refactor. It attempts to compare a non-existent Hash that used
to be inherited before the refactor. If this code had been left within
ExtraField it would make more sense, but as it's not needed there either
let's just remove it.

See 20d79fe for the refactor.
  • Loading branch information
hainesr committed Sep 21, 2020
1 parent e6580fa commit 2275e57
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions lib/zip/extra_field/generic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,6 @@ def initial_parse(binstr)
[binstr[2, 2].unpack1('v'), binstr[4..-1]]
end

def ==(other)
return false if self.class != other.class

each do |k, v|
return false if v != other[k]
end
true
end

def to_local_bin
s = pack_for_local
self.class.const_get(:HEADER_ID) + [s.bytesize].pack('v') << s
Expand Down

0 comments on commit 2275e57

Please sign in to comment.