Memory corruption, likely. Exit SketchUp. Reboot Computer.
If you can get a repeatable error with a certain model, a certain code snippet in the latest SketchUp version, please log a bug report in the API issue tracker.
Aside: Your method as shown returns an Array of two points, not a single point.
For Ruby 2+ (SU 2014 and higher) you can use the shorthand notation …
def get_points(edge)
edge.vertices.map(&:position)
end
And you can always do (which is likely faster) …
def get_points(edge)
[ edge.start.position, edge.end.position ]
end