Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: JRuby 0.9.8
-
Fix Version/s: JRuby 0.9.9
-
Component/s: None
-
Labels:None
Description
The following code:
-----------------
require 'rexml/document'
include REXML
doc = Document.new(ARGF)
doc.elements.each do |element|
puts element
end
-----------------
should print every element in an xml file provided as an argument. In JRuby the result is:
method_missing': undefined local variable or method 'source' for REXML::SourceFactory:Class (NameError)
from /home/jrduncans/apps/jruby/lib/ruby/1.8/rexml/source.rb:19:in `create_from'
from /home/jrduncans/apps/jruby/lib/ruby/1.8/rexml/parsers/baseparser.rb:123:in `stream='
from /home/jrduncans/apps/jruby/lib/ruby/1.8/rexml/parsers/baseparser.rb:100:in `initialize'
from /home/jrduncans/apps/jruby/lib/ruby/1.8/rexml/parsers/treeparser.rb:8:in `new'
from /home/jrduncans/apps/jruby/lib/ruby/1.8/rexml/parsers/treeparser.rb:8:in `initialize'
from /home/jrduncans/apps/jruby/lib/ruby/1.8/rexml/document.rb:190:in `new'
from /home/jrduncans/apps/jruby/lib/ruby/1.8/rexml/document.rb:190:in `build'
from /home/jrduncans/apps/jruby/lib/ruby/1.8/rexml/document.rb:45:in `initialize'