lib/sdl4r/sdl_parse_error.rb in sdl4r-0.9.6 vs lib/sdl4r/sdl_parse_error.rb in sdl4r-0.9.7

- old
+ new

@@ -34,13 +34,13 @@ # +position+ The position (within the line) where the error occured or -1 for unknown # 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) + "\n" + + ", Position " + ((position.nil? or position < 0)? "unknown" : position.to_s) + $/ + (line ? line + (position ? " " * (position - 1) : "") + "^" : "")) - @lineNo = line_no + @line = line_no @position = position end attr_reader :line attr_reader :position