Ball-Line Segment Collision on End-Point of Line
Possible Solutions:

Instead of using a single 1D 'line', you could construct a 2D rectangle (that is as this as you want/need it to be) --- composed of 4 separate 'lines'.  I.e. you can have collisions with any of the 4 faces of the rectangle object.  Would that work?
Do some sort of corner collision -- if the ball is 'hits' the start or end of a line, have it bounce off appropriately.  I think the way this would be done is as follows:
i. Collision occurs if the corner falls within the radius of the ball.
ii. Define a line between the corner and the center of the ball.
iii. Reverse the component of the ball's velocity along this line.
So I have a program where a ball subject to gravity bounces off of lines created by a user with mouse clicks. These lines are normally sloped. My collision bounces work perfectly EXCEPT in the case where ball does approximately this:
 ->O ------
My code works by finding the normal vector of the line such that the scalar product of the incident velocity vec of the ball  and the normal of the line is negative (this means the vector have opposite directions). 
Then I decompose the velocity into terms parallel and perpendicular to the normal,
and the reverse the direction of the parallel component.
During the edge case described above ball moves basically along the line. How can I account for this? Any advice?>