{"action":"closed","issue":{"url":"https://api.github.com/repos/sparklemotion/nokogiri/issues/1299","labels_url":"https://api.github.com/repos/sparklemotion/nokogiri/issues/1299/labels{/name}","comments_url":"https://api.github.com/repos/sparklemotion/nokogiri/issues/1299/comments","events_url":"https://api.github.com/repos/sparklemotion/nokogiri/issues/1299/events","html_url":"https://github.com/sparklemotion/nokogiri/issues/1299","id":86367182,"number":1299,"title":"On JRuby, removing a namespaced attribute doesn't work","user":{"login":"alex","id":772,"avatar_url":"https://avatars.githubusercontent.com/u/772?v=3","gravatar_id":"","url":"https://api.github.com/users/alex","html_url":"https://github.com/alex","followers_url":"https://api.github.com/users/alex/followers","following_url":"https://api.github.com/users/alex/following{/other_user}","gists_url":"https://api.github.com/users/alex/gists{/gist_id}","starred_url":"https://api.github.com/users/alex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alex/subscriptions","organizations_url":"https://api.github.com/users/alex/orgs","repos_url":"https://api.github.com/users/alex/repos","events_url":"https://api.github.com/users/alex/events{/privacy}","received_events_url":"https://api.github.com/users/alex/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-06-08T23:16:09Z","updated_at":"2015-06-10T01:40:00Z","closed_at":"2015-06-10T01:40:00Z","body":"This code reproduces the issue:\r\n\r\n```ruby\r\n#!/usr/bin/env jruby\r\n\r\nrequire 'nokogiri'\r\n\r\nputs RUBY_ENGINE\r\ndoc = Nokogiri::XML(<<-EOF)\r\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<node xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\">\r\n    <otherNode soapenv:mustUnderstand=\"1\"></otherNode>\r\n</node>\r\nEOF\r\n\r\nnode = doc.at_xpath(\"//otherNode\")\r\nputs node.attributes\r\nputs node.remove_attribute(\"mustUnderstand\")\r\nputs doc.to_s\r\n```\r\n\r\nWhen run under CRuby, `remove_attribute` will return the value `\"1\"`, and `doc.to_s` will show the XML without the attribute. On JRuby `remove_attribute` returns `nil`, and `doc.to_s` shows that `mustUnderstand` is still present."}}