From: "herwinw (Herwin Weststrate)" Date: 2014-01-06T19:30:32+09:00 Subject: [ruby-core:59588] [ruby-trunk - Bug #9369][Open] Using XMLScanStreamParser in xmlrpc/parser may result in parse errors Issue #9369 has been reported by herwinw (Herwin Weststrate). ---------------------------------------- Bug #9369: Using XMLScanStreamParser in xmlrpc/parser may result in parse errors https://bugs.ruby-lang.org/issues/9369 Author: herwinw (Herwin Weststrate) Status: Open Priority: Normal Assignee: Category: Target version: ruby -v: 1.9.3-p484 Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN, 2.1: UNKNOWN I've tried to use the attached script to test if the XMLScanStreamParser would be a suitable alternative for REXMLParser (which often results in out-of-memory-errors when using large data chunks). Unfortunately, using this parser results in other errors: /usr/lib/ruby/1.9.1/xmlrpc/parser.rb:747:in `on_stag_end': wrong number of arguments (3 for 1) (ArgumentError) The code calling on_stag_end in xmlscan/parser.rb is quite simple: def on_stag_end(name, *a) @visitor.on_stag_end name, *a end The following should probably fix this (although I've got no idea if this has any side effects): - def on_stag_end(name); end + def on_stag_end(name, *a); end An alternative solution might be to remove the definition of on_stag_end completely, that will result in a call to method_missing, which doesn't do anything either. -- http://bugs.ruby-lang.org/