1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* NEWS (REXML::Parsers::SAX2Parser): Add about this change.

* lib/rexml/parsers/sax2parser.rb (REXML::Parsers::SAX2Parser#parse):
  Fix wrong number of arguments. Document says "an array of the
  entity declaration" but it passes two or more arguments.
  This is a bug but it break backward compatibility.
  Reported by Ippei Obayashi. [Bug #8731] [ruby-dev:47582]
* lib/rexml/sax2listener.rb (REXML::SAX2Listener#entitydecl): ditto.
  The listener template accepted two arguments.
* test/rexml/parser/test_sax2.rb: Add tests for external ID case.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kou 2013-08-11 09:01:41 +00:00
parent 7e8b43687c
commit ce89dedde3
4 changed files with 37 additions and 4 deletions

View file

@ -177,7 +177,7 @@ module REXML
handle( :characters, copy )
when :entitydecl
@entities[ event[1] ] = event[2] if event.size == 3
handle( *event )
handle( event[0], event[1..-1] )
when :processing_instruction, :comment, :attlistdecl,
:elementdecl, :cdata, :notationdecl, :xmldecl
handle( *event )