#51: REXML -- 'trans' variable undefined in Document#write ------------------------------------+--------------------------------------- Reporter: insanitarian@yahoo.com | Owner: lsansonetti@apple.com Type: defect | Status: new Priority: minor | Milestone: Component: MacRuby | Keywords: REXML, Document, write, transitive ------------------------------------+--------------------------------------- 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 -- Ticket URL: <http://trac.macosforge.org/projects/ruby/ticket/51> ruby <http://ruby.macosforge.org/>