Skip to content

Commit f4263c7

Browse files
committed
Fix missing line numbers in error reports.
1 parent aef94a9 commit f4263c7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/rdf/turtle/reader.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ def error(*args)
549549
ctx = ""
550550
ctx += "(found #{options[:token].inspect})" if options[:token]
551551
ctx += ", production = #{options[:production].inspect}" if options[:production]
552-
lineno = @lineno || (options[:token].lineno if options[:token].respond_to?(:lineno))
552+
lineno = @lineno || (options[:token].lineno if options[:token].respond_to?(:lineno)) || @lexer.lineno
553553
log_error(*args, ctx,
554554
lineno: lineno,
555555
token: options[:token],

0 commit comments

Comments
 (0)