Project

General

Profile

Actions

Bug #8701

closed

REXML bug in parsing notation declarations

Added by ohai (Ippei Obayashi) over 10 years ago. Updated over 10 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 2.1.0dev (2013-07-28 trunk 42214) [x86_64-linux]
[ruby-dev:47551]

Description

添付したコード(test_notationdecl.rb)を実行すると、["x", "y", "z"] が表示することが期待されますが、["y", "z"] と表示されます。

パースに使っている正規表現の問題で, 添付したパッチ(rexml-dtd-notationdecl-fix.patch)で直ると思います。
テストも添付しています。

このパーサではあちこちで ^ で始まる正規表現が使われていますが、おそらくすべて \A のつもりであろうと思われます。添付したパッチでは関係のある部分だけ修正していますが、他の正規表現も修正したほうが良いかもしれません。


Files

test_notationdecl.rb (267 Bytes) test_notationdecl.rb ohai (Ippei Obayashi), 07/28/2013 11:20 PM
rexml-dtd-notationdecl-fix.patch (787 Bytes) rexml-dtd-notationdecl-fix.patch ohai (Ippei Obayashi), 07/28/2013 11:20 PM
rexml-dtd-notationdecl-test.patch (923 Bytes) rexml-dtd-notationdecl-test.patch ohai (Ippei Obayashi), 07/28/2013 11:20 PM
Actions

Also available in: Atom PDF

Like0
Like0Like0