Ticket #146 (new defect)
Opened 3 months ago
Pretty printing causes exception.
| Reported by: | martinp | Owned by: | ser |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Other | Version: | 3.1.7 |
| Severity: | normal | Keywords: | pretty printing |
| Cc: | Ruby version: | 1.8.5 | |
| Operating system: | Windows |
Description
simple program:
require "rexml/document" include REXML string = <<EOF
<mydoc>
<someelement attribute="nanoo">Text, text, text</someelement>
</mydoc>
EOF doc = Document.new string
doc.write( $stdout,1 ) # > -1 means pretty-print it.
causes this:
C:\Documents and Settings\martinp.IPTESTLTD\Desktop\rextest>ruby test.rb C:/ipTEST/tools/ruby/lib/ruby/site_ruby/1.8/rexml/document.rb:187:in `write': undefined local variable or method `trans' for <UNDEFINED> ... </>:REXML::Document
from test.rb:10
(Looks like it's caused by a typo in the src.)
The version info:
V:\>ruby -vrrexml/rexml -e 'p REXML::VERSION,PLATFORM' ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32] "3.1.7.3" "i386-mswin32"
This occurs after an install of the ruby one click windows installer, (which includes an older version of rexml) and also when 3.1.7.3 has been installed.
