{"issue":{"state":"open","pull_request":{"diff_url":null,"html_url":null,"patch_url":null},"user":{"avatar_url":"https://secure.gravatar.com/avatar/f9116c42e95b260f995680d301695a84?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"f9116c42e95b260f995680d301695a84","url":"https://api.github.com/users/benlangfeld","login":"benlangfeld","id":210221},"milestone":null,"assignee":null,"labels":[],"updated_at":"2011-11-02T16:42:43Z","comments":1,"closed_at":null,"url":"https://api.github.com/repos/tenderlove/nokogiri/issues/560","body":"The following simple test case:\r\n\r\n```ruby\r\n\r\nrequire 'nokogiri'\r\n\r\nclass MyNode < Nokogiri::XML::Node\r\n  def self.new(*args)\r\n    super\r\n  end\r\nend\r\n\r\nclass MyNode2 < Nokogiri::XML::Node\r\n  def initialize(*args)\r\n    super\r\n  end\r\nend\r\n\r\nclass MyNode3 < Nokogiri::XML::Node\r\nend\r\n\r\ndescribe MyNode do\r\n  subject { MyNode.new 'foo', Nokogiri::XML::Document.new }\r\n\r\n  its(:name) { should == 'foo' }\r\n\r\n  it 'should read/write attributes correctly' do\r\n    subject['foo'] = 'bar'\r\n    subject.attributes['foo'].should be_a Nokogiri::XML::Attr\r\n  end\r\nend\r\n\r\ndescribe MyNode2 do\r\n  subject { MyNode2.new 'foo', Nokogiri::XML::Document.new }\r\n\r\n  its(:name) { should == 'foo' }\r\n\r\n  it 'should read/write attributes correctly' do\r\n    subject['foo'] = 'bar'\r\n    subject.attributes['foo'].should be_a Nokogiri::XML::Attr\r\n  end\r\nend\r\n\r\ndescribe MyNode3 do\r\n  subject { MyNode3.new 'foo', Nokogiri::XML::Document.new }\r\n\r\n  its(:name) { should == 'foo' }\r\n\r\n  it 'should read/write attributes correctly' do\r\n    subject['foo'] = 'bar'\r\n    subject.attributes['foo'].should be_a Nokogiri::XML::Attr\r\n  end\r\nend\r\n\r\ndescribe Nokogiri::XML::Node do\r\n  subject { Nokogiri::XML::Node.new 'foo', Nokogiri::XML::Document.new }\r\n\r\n  its(:name) { should == 'foo' }\r\n\r\n  it 'should read/write attributes correctly' do\r\n    subject['foo'] = 'bar'\r\n    subject.attributes['foo'].should be_a Nokogiri::XML::Attr\r\n  end\r\nend\r\n```\r\n\r\ncauses the following failures:\r\n\r\n```\r\n{16:13}[jruby-1.6.5]~/Desktop ben% be rspec nokogiri_java.rb \r\nF.F.F...\r\n\r\nFailures:\r\n\r\n  1) MyNode should read/write attributes correctly\r\n     Failure/Error: subject.attributes['foo'].should be_a Nokogiri::XML::Attr\r\n       expected nil to be a kind of Nokogiri::XML::Attr\r\n     # ./nokogiri_java.rb:25:in `(root)'\r\n\r\n  2) MyNode2 should read/write attributes correctly\r\n     Failure/Error: subject.attributes['foo'].should be_a Nokogiri::XML::Attr\r\n       expected nil to be a kind of Nokogiri::XML::Attr\r\n     # ./nokogiri_java.rb:36:in `(root)'\r\n\r\n  3) MyNode3 should read/write attributes correctly\r\n     Failure/Error: subject.attributes['foo'].should be_a Nokogiri::XML::Attr\r\n       expected nil to be a kind of Nokogiri::XML::Attr\r\n     # ./nokogiri_java.rb:47:in `(root)'\r\n\r\nFinished in 2.15 seconds\r\n8 examples, 3 failures\r\n\r\nFailed examples:\r\n\r\nrspec ./nokogiri_java.rb:23 # MyNode should read/write attributes correctly\r\nrspec ./nokogiri_java.rb:34 # MyNode2 should read/write attributes correctly\r\nrspec ./nokogiri_java.rb:45 # MyNode3 should read/write attributes correctly\r\nbundle exec rspec nokogiri_java.rb  31.41s user 1.75s system 233% cpu 14.218 total\r\n```\r\n\r\nThese failures do not occur on CRuby (1.9.2/3) or when using Nokogiri 1.4.7. They have been introduced in Nokogiri 1.5, and unfortunately getting Nokogiri's tests running on JRuby is impossible, as is a bisect, due to the non-linear history between the 1.4 and 1.5 branches.","html_url":"https://github.com/tenderlove/nokogiri/issues/560","number":560,"title":"Inheriting from Nokogiri::XML::Node on JRuby (1.6.4/5) fails","id":2123225,"created_at":"2011-11-02T16:20:07Z"},"action":"created","comment":{"user":{"avatar_url":"https://secure.gravatar.com/avatar/f9116c42e95b260f995680d301695a84?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"f9116c42e95b260f995680d301695a84","url":"https://api.github.com/users/benlangfeld","login":"benlangfeld","id":210221},"updated_at":"2011-11-02T16:42:43Z","url":"https://api.github.com/repos/tenderlove/nokogiri/issues/comments/2605871","body":"Subscribing @taylor and @lgleasain","id":2605871,"created_at":"2011-11-02T16:42:43Z"}}