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

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

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

Wes

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs