def each_segments(&block)
      return enum_for(:each_segments) unless block_given?

      Array.new(num_segments) do |i|
        segment_at(i).tap(&block)
      end
    end
def each_segments(&block)
      return enum_for(:each_segments) unless block_given?

      Array.new(num_segments) do |i|
        segment_at(i).tap(&block)
      end
    end
Iterate all segments.

 All segments are lazy loading, the segment
 only be created whenever accessing it.
 This method is useful for {#segment_by_type}
 since not all segments need to be created.
 @yieldparam [ELFTools::Segments::Segment] segment A segment.
 @yieldreturn [void]
 @return [Array<ELFTools::Segments::Segment>]
   Whole segments will be returned.