# Patch for lib/rexml/document.rb@13607

**URL:** <https://www.ruby-forum.com/t/patch-for-lib-rexml-document-rb-13607/117048>\
**Category:** Development\
**Created:** [October 12, 2007, 12:30pm UTC](https://www.ruby-forum.com/t/patch-for-lib-rexml-document-rb-13607/117048 "2007-10-12T12:30:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [October 12, 2007, 12:30pm UTC](https://www.ruby-forum.com/t/patch-for-lib-rexml-document-rb-13607/117048/1 "2007-10-12T12:30:02Z")

</div>

e$B2!ED$H$$$$$^$9!#e(B  
e$BF|!9e(B ruby e$B$r3hMQ$5$;$FD:$$$F$\*$j$^$9!#e(B

rexml e$B$Ne(B document e$B$Ke(B revert e$BITB-$,8+$D$+$j$^$7$F!"e(B  
e$B$=$N%Q%C%A$r$\*Aw$j$7$^$9!#e(B

r11752 e$B$Ge(B transitive e$B"\*e(B trans e$B$HJQ99$5$l$?$b$N$re(B  
r13607 e$B$GLa$7$=$S$l$F$$$k!"$H$$$&$b$N$G$9!#e(B

Fedora7 e$B$Ne(B 1.8.6.110-1 e$B$G@[:n$N%W%m%0%i%`$,e(B NameError  
e$B$9$k$h$&$K$J$j!"e(B  
e$B$A$g$C$H6C$-$^$7$?e(B(^^;

e$B=$@5$h$m$7$/$_4j$$$7$^$9!#e(B  
1.9.1 e$B3Z$7$\_$K$7$F$_$j$^$9!#e(B

# Index: document.rb

— document.rb (revision 13681)  
+++ document.rb (working copy)  
@@ -167,7 +167,7 @@  
# indentation will be twice this number of spaces, and children  
will be  
# indented an additional amount. For a value of 3, every item  
will be  
# indented 3 more levels, or 6 more spaces (2 \* 3). Defaults to  
-1

- 
# trans::

- 
# transitive::

# If transitive is true and indent is \>= 0, then the output will

be  
# pretty-printed in such a way that the added whitespace does not  
affect  
# the absolute _value_ of the document – that is, it leaves the  
value  
@@ -178,7 +178,7 @@  
# unable to parse proper XML, we have to provide a hack to  
generate XML  
# that IE’s limited abilities can handle. This hack inserts a  
space  
# before the /\> on empty tags. Defaults to false

- 

```
          def write( output=$stdout, indent=-1, trans=false, 

```

ie\_hack=false )

- 

```
          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
