Skip to content

Commit

Permalink
doc: clarify SyntaxError#path docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
flavorjones committed Oct 18, 2024
1 parent 7ef0965 commit 2018e8e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/nokogiri/xml/syntax_error.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,14 @@ def aggregate(errors)
attr_reader :level
attr_reader :file
attr_reader :line
# ⚠ path functionality is not available when running JRuby.

# The XPath path of the node that caused the error when validating a `Nokogiri::XML::Document`.
#
# This attribute will only be non-nil when the error is emitted by `Schema#validate` on
# Document objects. It will return `nil` for DOM parsing errors and for errors emitted during
# Schema validation of files.
#
# path of the node that caused the error when validating a `Nokogiri::XML::Document`
# ⚠ `#path` is not supported on JRuby, where it will always return `nil`.
attr_reader :path
attr_reader :str1
attr_reader :str2
Expand Down

0 comments on commit 2018e8e

Please sign in to comment.