REXML (1.8.6 p111) Document.write fails - "undefined local"

W

Wes Gamble

All,

Windows One-Click installer Ruby 1.8.6 patchlevel 111.

I have code that uses REXML to emit an XML document and when I run it on
1.8.6 (upgraded) from 1.8.4, I see the error "undefined local variable".
Sure enough,
if I look in the Document.write method, I see a variable "transitive"
that should be named "trans".

def write( output=$stdout, indent=-1, trans=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 transitive
REXML::Formatters::Transitive.new( indent, ie_hack )
else
REXML::Formatters::pretty.new( indent, ie_hack )
end
else
REXML::Formatters::Default.new( ie_hack )
end
formatter.write( self, output )
end

This is also referenced in this thread from last October:
http://www.ruby-forum.com/topic/128842

Is there an updated set of REXML standard library files that I can
download. I assume that this is fixed already in the standard lib
trunk.

What is the best way to resolve this?

Thanks,
Wes
 
W

Wes Gamble

Current solution is to simply fix the name of the variable. Whatever
problem this was causing resolved itself.

Wes
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top