Skip to content

Commit

Permalink
Fix missing line numbers in error reports.
Browse files Browse the repository at this point in the history
  • Loading branch information
gkellogg committed Jan 7, 2017
1 parent aef94a9 commit f4263c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rdf/turtle/reader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ def error(*args)
ctx = ""
ctx += "(found #{options[:token].inspect})" if options[:token]
ctx += ", production = #{options[:production].inspect}" if options[:production]
lineno = @lineno || (options[:token].lineno if options[:token].respond_to?(:lineno))
lineno = @lineno || (options[:token].lineno if options[:token].respond_to?(:lineno)) || @lexer.lineno
log_error(*args, ctx,
lineno: lineno,
token: options[:token],
Expand Down

0 comments on commit f4263c7

Please sign in to comment.