lib/sdl4r/sdl_parse_error.rb in sdl4r-0.9.7 vs lib/sdl4r/sdl_parse_error.rb in sdl4r-0.9.8
- old
+ new
@@ -35,10 +35,10 @@
#
def initialize(description, line_no, position, line = nil)
super(
"#{description} Line " + ((line_no.nil? or line_no < 0)? "unknown" : line_no.to_s) +
", Position " + ((position.nil? or position < 0)? "unknown" : position.to_s) + $/ +
- (line ? line + (position ? " " * (position - 1) : "") + "^" : ""))
+ ((line and position >= 0)? line + (position ? " " * (position - 1) : "") + "^" : ""))
@line = line_no
@position = position
end