Public bug reported:

The following code raises an error when executed with ruby2.7
2.7.0-5ubuntu1.16.

```
# ruby -r rexml/document -e 'REXML::Document.new(%(<?xml version="1.0"?><html 
xmlns="http://www.w3.org/1999/xhtml"; xml:lang="ja" lang="ja"></html>))'
Traceback (most recent call last):
        7: from -e:1:in `<main>'                                                
                                                                                
                                                                                
                                     6: from -e:1:in `new'
        5: from /usr/lib/ruby/2.7.0/rexml/document.rb:45:in `initialize'
        4: from /usr/lib/ruby/2.7.0/rexml/document.rb:288:in `build'
        3: from /usr/lib/ruby/2.7.0/rexml/parsers/treeparser.rb:23:in `parse'
        2: from /usr/lib/ruby/2.7.0/rexml/parsers/baseparser.rb:209:in `pull'
        1: from /usr/lib/ruby/2.7.0/rexml/parsers/baseparser.rb:432:in 
`pull_event'
/usr/lib/ruby/2.7.0/rexml/parsers/baseparser.rb:748:in `parse_attributes': 
Namespace conflict in adding attribute "lang": Prefix "xml" = "" and prefix "" 
= "" (REXML::ParseException)
Line: 1
Position: 88
Last 80 unconsumed characters:
>
```

This seems to be a regression introduced by
 
https://git.launchpad.net/ubuntu/+source/ruby2.7/commit/lib/rexml/parsers/baseparser.rb?h=applied/2.7.0-5ubuntu1.16&id=85e52f99de3a1577d5892496dcd7634edec9c967
 which lacks 
https://github.com/ruby/rexml/commit/78f8712dccad773a51dc5eef31c02d523e994570

** Affects: ruby2.7 (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2097527

Title:
  ruby2.7 2.7.0-5ubuntu1.16 regression: REXML parse error  with "xml:"
  prefix

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ruby2.7/+bug/2097527/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to