Projects

Ticket #51 (closed defect: fixed)

Opened 15 months ago

Last modified 14 months ago

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

Change History

Changed 15 months ago by lsansonetti@…

This is an old bug that was fixed in 1.8 but not in 1.9, on which we are based upon. The fix was recently brought in Ruby trunk and should be fixed after the upcoming sync.

Changed 14 months ago by lsansonetti@…

  • status changed from new to closed
  • resolution set to fixed
  • milestone set to MacRuby 0.2

Should be fixed in trunk, closing.

Note: See TracTickets for help on using tickets.