Ticket #51 (closed defect: fixed)
REXML -- 'trans' variable undefined in Document#write
| Reported by: | insanitarian@… | Owned by: | lsansonetti@… |
|---|---|---|---|
| Priority: | minor | Milestone: | MacRuby 0.2 |
| Component: | MacRuby | Keywords: | REXML, Document, write, transitive |
| Cc: |
Description
The error message (below) is given when calling method "write" from REXML::Document.
Example: @newxml = REXML::Document.new(File.open("/file.xml")); @newxml.write($stdout, 1)
Error Message: /Library/Frameworks/MacRuby.framework/Versions/0.2/usr/lib/ruby/1.9.0/rexml/document.rb:187:in write': undefined local variable or method trans' for <UNDEFINED> ... </>:REXML::Document (NameError)
Corresponding Code: #/Library/Frameworks/MacRuby.framework/Versions/0.2/usr/lib/ruby/1.9.0/rexml/document.rb
# Line 182:188
def write( output=$stdout, indent=-1, transitive=false, ie_hack=false )
if xml_decl.encoding != "UTF-8" && !output.kind_of?(Output)
output = Output.new( output, xml_decl.encoding )
end formatter = if indent > -1
if trans
REXML::Formatters::Transitive.new( indent, ie_hack )
Fix: -if trans; +if transitive

