Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/geo_ruby/gpx.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def as_line_string
# If the GPX isn't closed, a line from the first
# to the last point will be created to close it.
def as_polygon
GeoRuby::SimpleFeatures::Polygon.from_points([@points[0] == @points[-1] ? @points : @points.push(@points[0].clone)])
GeoRuby::SimpleFeatures::Polygon.from_points([@points[0] == @points[-1] ? @points : (@points + [@points[0]])])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Layout/SpaceAroundOperators: Operator ? should be surrounded by a single space.
Metrics/LineLength: Line is too long. [119/80]
Layout/ExtraSpacing: Unnecessary spacing detected.

end

# Return GPX Envelope
Expand Down