summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorser <ser@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-05-16 18:42:58 +0000
committerser <ser@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-05-16 18:42:58 +0000
commit0d04057aad88b17c6189caa2443cd4b79ba96b13 (patch)
tree0dbe5f70de81f17d043a39947e72a02c428c9a0d /lib
parentfcc9c6eab39a535efb827e5fd556dc043bdff6e6 (diff)
------------------------------------------------------------------------
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/rexml/cdata.rb2
-rw-r--r--lib/rexml/element.rb2
-rw-r--r--lib/rexml/rexml.rb4
-rw-r--r--lib/rexml/text.rb4
4 files changed, 6 insertions, 6 deletions
diff --git a/lib/rexml/cdata.rb b/lib/rexml/cdata.rb
index 402a0187ff..9e82376cd8 100644
--- a/lib/rexml/cdata.rb
+++ b/lib/rexml/cdata.rb
@@ -59,7 +59,7 @@ module REXML
# c = CData.new( " Some text " )
# c.write( $stdout ) #-> <![CDATA[ Some text ]]>
def write( output=$stdout, indent=-1, transitive=false, ie_hack=false )
- indent( output, indent )
+ indent( output, indent ) unless transitive
output << START
output << @string
output << STOP
diff --git a/lib/rexml/element.rb b/lib/rexml/element.rb
index 6456518cd7..ffc81bed91 100644
--- a/lib/rexml/element.rb
+++ b/lib/rexml/element.rb
@@ -659,7 +659,7 @@ module REXML
end
writer << "/"
else
- if transitive and indent>-1 and !@children[0].kind_of? Text
+ if transitive and indent>-1 and !@children[0].instance_of? Text
writer << "\n"
indent writer, indent+1
end
diff --git a/lib/rexml/rexml.rb b/lib/rexml/rexml.rb
index da1b88ddd3..540d5c3a9d 100644
--- a/lib/rexml/rexml.rb
+++ b/lib/rexml/rexml.rb
@@ -10,7 +10,7 @@
#
# Main page:: http://www.germane-software.com/software/rexml
# Author:: Sean Russell <serATgermaneHYPHENsoftwareDOTcom>
-# Version:: 3.0.7
+# Version:: 3.0.8
# Date:: +2004/137
#
# This API documentation can be downloaded from the REXML home page, or can
@@ -22,5 +22,5 @@
module REXML
Copyright = "Copyright © 2001, 2002, 2003, 2004 Sean Russell <ser@germane-software.com>"
Date = "+2004/137"
- Version = "3.0.7"
+ Version = "3.0.8"
end
diff --git a/lib/rexml/text.rb b/lib/rexml/text.rb
index 1d2d2dd711..388256ac81 100644
--- a/lib/rexml/text.rb
+++ b/lib/rexml/text.rb
@@ -194,7 +194,7 @@ module REXML
@raw = false
end
- def indent(string, level=1, style="\t", indentfirstline=true)
+ def indent_text(string, level=1, style="\t", indentfirstline=true)
return string if level < 0
new_string = ''
string.each { |line|
@@ -211,7 +211,7 @@ module REXML
if not (@parent and @parent.whitespace) then
s = wrap(s, 60, false) if @parent and @parent.context[:wordwrap] == :all
if @parent and not @parent.context[:indentstyle].nil? and indent > 0 and s.count("\n") > 0
- s = indent(s, indent, @parent.context[:indentstyle], false)
+ s = indent_text(s, indent, @parent.context[:indentstyle], false)
end
s.squeeze!(" \n\t") if @parent and !@parent.whitespace
end