X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/0e2a66e8de55b3719bd307261058b7f898598994..d8b9b6dd58cf049acc6cf647f80ceb5e3e200cd6:/lib/gpx.rb?ds=inline diff --git a/lib/gpx.rb b/lib/gpx.rb index 1a1d0b996..86cf2f49d 100644 --- a/lib/gpx.rb +++ b/lib/gpx.rb @@ -37,15 +37,15 @@ module GPX end def points(&block) - return enum_for(:points) unless block_given? + return enum_for(:points) unless block @possible_points = 0 @actual_points = 0 @tracksegs = 0 begin - Archive::Reader.open_filename(@file).each_entry_with_data do |_entry, data| - parse_file(XML::Reader.string(data), &block) + Archive::Reader.open_filename(@file).each_entry_with_data do |entry, data| + parse_file(XML::Reader.string(data), &block) if entry.regular? end rescue Archive::Error io = ::File.open(@file)