actually I've encountered a problem about parsing a XML String with REXML::Document in jruby-1.6.7 with Rails 3.2.1.
I have a string like
<?xml version="1.0" encoding="US-ASCII"?><a><b>Something</b></a>
It used to work with jruby-1.6.5.1 when doing a
doc = REXML::Document.new(xml_string)
As of now, it fails with:
failed - can't convert NilClass into String
backtrace of deliver! org/jruby/RubyIconv.java:207:in `initialize'
org/jruby/RubyIconv.java:391:in `conv'
/opt/jruby/lib/ruby/1.8/rexml/encodings/ICONV.rb:12:in `encode'
/opt/jruby/lib/ruby/1.8/rexml/source.rb:55:in `encoding='
/opt/jruby/lib/ruby/1.8/rexml/source.rb:45:in `initialize'
/opt/jruby/lib/ruby/1.8/rexml/source.rb:11:in `create_from'
/opt/jruby/lib/ruby/1.8/rexml/parsers/baseparser.rb:121:in `stream='
/opt/jruby/lib/ruby/1.8/rexml/parsers/baseparser.rb:110:in `initialize'
/opt/jruby/lib/ruby/1.8/rexml/parsers/treeparser.rb:9:in `initialize'
/opt/jruby/lib/ruby/1.8/rexml/document.rb:227:in `build'
/opt/jruby/lib/ruby/1.8/rexml/document.rb:43:in `initialize'
When changing the Header to look like:
<?xml version="1.0" encoding="utf-8"?><a><b>Something</b></a>
everything's fine. Do I miss a lib on my system, is it a known problem? Is US-ASCII invalid??