From 59aa3e5b9b694a6e0a3a99fdb5d629a43fa0e08f Mon Sep 17 00:00:00 2001 From: Doug Fales Date: Tue, 4 Dec 2007 17:58:48 +0000 Subject: [PATCH] Thanks to Christian Koerner for finding and fixing these bugs in the waypoint code. --- lib/gpx/waypoint.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/gpx/waypoint.rb b/lib/gpx/waypoint.rb index 388ebb2..56010bb 100644 --- a/lib/gpx/waypoint.rb +++ b/lib/gpx/waypoint.rb @@ -27,7 +27,7 @@ module GPX # not seen much use yet, since WalkingBoss does not use waypoints right now. class Waypoint < Point - SUB_ELEMENTS = %q{ magvar geoidheight name cmt desc src link sym type fix sat hdop vdop pdop ageofdgpsdata dgpsid extensions } + SUB_ELEMENTS = %w{ magvar geoidheight name cmt desc src link sym type fix sat hdop vdop pdop ageofdgpsdata dgpsid extensions } attr_reader :gpx_file @@ -42,9 +42,9 @@ module GPX # Initializes a waypoint from a XML::Node. def initialize(opts = {}) wpt_elem = opts[:element] - super(:element => wpt_elem) - instantiate_with_text_elements(wpt_elem, SUB_ELEMENTS) @gpx_file = opts[:gpx_file] + super(:element => wpt_elem, :gpx_file => @gpx_file) + instantiate_with_text_elements(wpt_elem, SUB_ELEMENTS) end # Converts a waypoint to a XML::Node.