Skip to content

Commit

Permalink
Disable errors clone for rbx
Browse files Browse the repository at this point in the history
  • Loading branch information
spk committed Mar 5, 2016
1 parent 3e5a24a commit 49cc162
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/nokogiri/version.rb
Expand Up @@ -11,6 +11,10 @@ def engine
defined?(RUBY_ENGINE) ? RUBY_ENGINE : 'mri'
end

def rbx?
RUBY_ENGINE == 'rbx'
end

def loaded_parser_version
LIBXML_PARSER_VERSION.scan(/^(\d+)(\d\d)(\d\d)(?!\d)/).first.collect{ |j|
j.to_i
Expand Down Expand Up @@ -105,4 +109,8 @@ def self.uses_libxml? # :nodoc:
def self.jruby? # :nodoc:
VersionInfo.instance.jruby?
end

def self.rbx? # :nodoc:
VersionInfo.instance.rbx?
end
end
1 change: 1 addition & 0 deletions test/html/test_document.rb
Expand Up @@ -628,6 +628,7 @@ def test_empty_document
end

def test_capturing_nonparse_errors_during_document_clone
skip("Rubinius does not dup column, bug?") if Nokogiri.rbx?
# see https://github.com/sparklemotion/nokogiri/issues/1196 for background
original = Nokogiri::HTML.parse("<div id='unique'></div><div id='unique'></div>")
original_errors = original.errors.dup
Expand Down

0 comments on commit 49cc162

Please sign in to comment.