summaryrefslogtreecommitdiff
path: root/lib/Travel
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-07-13 16:03:00 +0200
committerDaniel Friesel <derf@finalrewind.org>2011-07-13 16:03:00 +0200
commit54943f4f6ec0db570f8fe57fb28a5e3ea6472dc8 (patch)
treeac81b3fb995cbbdddb1017ad10b0576ee36d77e8 /lib/Travel
parent91a31f674b366d4e86a6bfae12c0922c396a7df1 (diff)
DeutscheBahn/Result: route_interesting adjustment, add tests for it
Diffstat (limited to 'lib/Travel')
-rw-r--r--lib/Travel/Status/DE/DeutscheBahn/Result.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Travel/Status/DE/DeutscheBahn/Result.pm b/lib/Travel/Status/DE/DeutscheBahn/Result.pm
index 79cf5d4..a474f8a 100644
--- a/lib/Travel/Status/DE/DeutscheBahn/Result.pm
+++ b/lib/Travel/Status/DE/DeutscheBahn/Result.pm
@@ -79,6 +79,10 @@ sub route_interesting {
}
$last_stop = pop(@via);
+ if ( @via_main and $via_main[-1] eq $last_stop ) {
+ pop(@via_main);
+ }
+
if ( @via_main and @via and $via[0] eq $via_main[0] ) {
shift(@via_main);
}